Model Training and Evaluation

Section progress0%

Video lesson

This video comes with the full course

Timestamps (11) · Corrections (2)
  1. 0:00Intro
  2. 1:07K-fold cross-validation with logistic regression (manual implementation)
  3. 5:58SVM with feature scaling and scikit-learn pipelines
  4. 9:53XGBoost with polynomial features in a pipeline
  5. 13:59Classification metrics: accuracy, precision, recall, F1
  6. 17:17Regression metrics: MSE, MAE, and R²
  7. 21:51ROC curves, AUC, and classification thresholds
  8. 28:50Confusion matrix
  9. 29:39Hyperparameter optimization with grid search CV
  10. 33:37Model selection: performance vs. practical trade-offs
  11. 37:08Ensembling

Corrections to this recording

  • A selected model needs a separate final assessment

    At 34:42

    Comparing candidates on the evaluation set makes that set part of model selection. A fresh held-out dataset is needed to assess the selected model without reusing the scores that helped choose it.

  • A pipeline’s final estimator need not transform data

    At 12:19

    Intermediate preprocessing steps implement fit and transform. The final XGBClassifier implements fit and prediction methods; it does not need transform to work as the pipeline’s final step.