ExamplesΒΆ
This section provides comprehensive examples showing how to use optimal-classification-cutoffs in various scenarios. All examples are executable Jupyter notebooks that demonstrate the power of API 2.0.0.
Note
All notebooks are executed automatically during documentation build to ensure they work with the latest code. You can also download and run them locally.
Interactive NotebooksΒΆ
Learning PathΒΆ
For the best learning experience, follow this order:
Quickstart β See immediate 40%+ improvements with minimal code
Business Value β Understand cost-sensitive optimization for real ROI
Multiclass β Master advanced multiclass threshold strategies
Interactive Demo β Explore mathematical foundations interactively
Each example builds on the previous ones while being self-contained enough to run independently.
Running the ExamplesΒΆ
To run these examples locally:
Install with examples dependencies:
pip install optimal-classification-cutoffs[examples]
Download the notebooks from the GitHub repository
Launch Jupyter:
jupyter notebookOpen and run any of the example notebooks
What Youβll LearnΒΆ
API 2.0.0 Features Demonstrated:
Progressive disclosure design (simple β advanced)
Explainable auto-selection with reasoning
Enum-based explicit control (Task, Average)
Namespace organization (metrics/, cv/, bayes/, algorithms/)
Modern match/case performance optimizations
API v2.0 with modernized design patterns
Real-World Applications:
Fraud detection with cost-sensitive optimization
Medical diagnosis with asymmetric error costs
Document classification with multiclass strategies
A/B testing with threshold validation
Business ROI calculation from model improvements
Each notebook contains working code you can run immediately to see 40%+ performance improvements over default 0.5 thresholds.