Skip to content

Examples ​

Short, focused recipes — each example is self-contained and demonstrates a single feature you can copy directly into a script or notebook.

Examples vs Tutorials

Examples are focused recipes that each show one capability (a scorer, a plot, checkpointing, …). Tutorials are longer, end-to-end walkthroughs of a complete real-world task — from raw data to a tuned, evaluated model — usually integrating a specific library (XGBoost, LightGBM, CatBoost, …).

ExampleWhat it covers
Comparing Search MethodsSide-by-side: GASearchCV vs RandomizedSearchCV vs GridSearchCV
Advanced Random Forest TuningSmart initialization, warm starts, diversity control, fitness sharing, local search, adaptive schedules
Pipeline RegressionPipeline parameter naming, regression scorers, search visualization
Conditional Choices in a PipelineEncode each valid SVM kernel and parameter combination once
Hyperparameter Search with a Precomputed KernelFit an SVC on a square training kernel and score a rectangular test kernel
Custom Outlier Scoring Without LabelsTune a detector and select features with the same unlabeled scorer

Feature Selection ​

ExampleWhat it covers
Finding the Signal in 60 ColumnsGAFeatureSelectionCV recovers the signal from a dataset that is two-thirds noise, beating the all-features baseline
Feature Selection for Multi-Output RegressionSelect one feature mask for multiple targets and report each target's test error
Feature Selection for Categorical ColumnsSelect raw columns with an encoder fitted inside each fold
Warm-Start Feature SelectionReuse a known feature subset and score it on a new batch
Advanced RF + Feature SelectionFeature selection after hyperparameter tuning

Multi-Metric and Refit ​

ExampleWhat it covers
Multi-Metric Search on Imbalanced DataMultiple scorers that genuinely disagree, choosing the refit metric, inspecting per-metric cv_results_

Experiment Tracking ​

ExampleWhat it covers
MLflow 3 Experiment TrackingParent/child runs, dataset inputs, logged models, model lifecycle tags

Visualization ​

ExampleWhat it covers
Plotting Galleryplot_fitness_evolution, plot_history, plot_search_space

Persistence ​

ExampleWhat it covers
Checkpointing and PersistenceModelCheckpoint, save, load, inspecting checkpoint contents

Released under the MIT License.