Skip to content

Development version

You are reading the latest (development) docs. This version tracks the master branch and may contain unreleased features or breaking changes. For stable documentation, see stable.

Hyperparameter Tuning Tutorials

Step-by-step tutorials for common real-world scenarios. Each tutorial is self-contained and includes a baseline comparison, runnable code, visualizations, and practical notes.

Tutorials vs Examples

Tutorials are end-to-end walkthroughs of a complete real-world task — from raw data to a tuned, evaluated model. Examples are shorter, focused recipes that each demonstrate a single feature you can drop into your own code.

scikit-learn Estimators

TutorialDifficultyWhat it covers
Random Forest Hyperparameter TuningIntermediate7-parameter joint search, which params matter, classification and regression, baseline comparison
Gradient Boosting Hyperparameter TuningIntermediateHistGradientBoosting vs classic GBM, max_leaf_nodes vs max_depth, speed comparison
Logistic Regression Hyperparameter TuningBeginnerC, penalty, solver compatibility, multi-penalty search with SAGA
SVM Hyperparameter Tuning (C, kernel, gamma)IntermediateC–gamma interaction, Pipeline with StandardScaler, RBF vs linear kernel, scaling limits

Gradient Boosting Libraries

TutorialDifficultyWhat it covers
XGBoost Hyperparameter TuningIntermediate9-parameter XGBoost search, adaptive schedules, feature importance, 3-way comparison
LightGBM Hyperparameter TuningIntermediate9-parameter LightGBM search, num_leaves/max_depth interaction, parameter scatter plots
CatBoost Hyperparameter TuningIntermediate7-parameter CatBoost search, bagging_temperature, border_count, GPU tip

Feature Selection

TutorialDifficultyWhat it covers
Feature Selection with Genetic AlgorithmsAdvanced3-stage workflow: select on 50 features, retune on selected subset, validate with a second estimator

Imbalanced Data

TutorialDifficultyWhat it covers
Hyperparameter Tuning for Imbalanced DatasetsIntermediate95/5 imbalance, class_weight as search param, balanced_accuracy scoring, confusion matrices

Outlier Detection

TutorialDifficultyWhat it covers
Isolation Forest Hyperparameter TuningAdvancedCustom scorer from score_samples, 4-param search, anomaly contour plots, ROC curve

Not Sure Where to Start?

Recommended reading order

  1. How Hyperparameter Optimization Works — theory and method comparison
  2. When to Use Genetic Algorithm Search — decide if GASearchCV fits your problem
  3. Getting Started with GASearchCV — run your first search
  4. Pick the tutorial for your model above

See Also

Released under the MIT License.