Examples
End-to-end runnable examples from real use cases. Each example is self-contained — you can copy the code directly into a script or notebook.
Looking for deeper tutorials?
The Tutorials section covers comprehensive walkthroughs for XGBoost, LightGBM, CatBoost, multi-stage feature selection, and imbalanced classification — each with baseline comparisons, visualizations, and practical notes.
Hyperparameter Search
| Example | What it covers |
|---|---|
| Comparing Search Methods | Side-by-side: GASearchCV vs RandomizedSearchCV vs GridSearchCV |
| Advanced Random Forest Tuning | Smart initialization, warm starts, diversity control, fitness sharing, local search, adaptive schedules |
| Pipeline Regression | Pipeline parameter naming, regression scorers, search visualization |
Feature Selection
| Example | What it covers |
|---|---|
| Feature Selection With Noisy Data | GAFeatureSelectionCV on Iris with 12 added noise features |
| Advanced RF + Feature Selection | Feature selection after hyperparameter tuning |
Multi-Metric and Refit
| Example | What it covers |
|---|---|
| Multi-Metric Search on Iris | Multiple scorers, choosing refit metric, inspecting cv_results_ per metric |
Experiment Tracking
| Example | What it covers |
|---|---|
| MLflow 3 Experiment Tracking | Parent/child runs, dataset inputs, logged models, model lifecycle tags |
Visualization
| Example | What it covers |
|---|---|
| Plotting Gallery | plot_fitness_evolution, plot_history, plot_search_space |
Persistence
| Example | What it covers |
|---|---|
| Checkpointing and Persistence | ModelCheckpoint, save, load, inspecting checkpoint contents |
