Python — From Basics to Advanced · scikit-learn — Classical ML
Metrics and hyperparameter tuning
scikit-learn — Classical ML
Introduction
Training is only half the work — what remains is EVALUATING the model (does 99% accuracy mean a good model or a cheat?) and TUNING hyperparameters (is max_depth=5 optimal or 50?). The lesson systematises classification metrics (accuracy misleads with imbalanced classes — precision/recall/F1/ROC-AUC are usually better) and regression metrics (MAE vs MSE vs R²). It shows tuning tools (GridSearchCV for small grids, RandomizedSearchCV for large ones) with proper cross-validation. After it you will not report a single metric — you will know which of the TEN available ones to use for your problem and how to optimise it.