Complete for freeAdvanced intermediate

Course 19

Intermediate Machine Learning and Model Evaluation

Most model comparisons fall apart under one good question: was the test data really unseen, would the ranking survive a different split, is the probability of 0.8 really 80%? This course teaches the habits that make the answer yes. You work in Google Colab with scikit-learn, pandas, NumPy, SciPy, and matplotlib. Early modules put every feature-engineering step inside a Pipeline and ColumnTransformer (including FunctionTransformer and transformer classes you write yourself), then measure performance with KFold, StratifiedKFold, GroupKFold, TimeSeriesSplit, and nested cross-validation, and tune with grid, randomized, and successive-halving searches plus early stopping, all sized to finish in seconds. Later modules handle rare classes, compare forests and gradient boosting, hunt down leakage, check whether predicted probabilities are calibrated, explain what a model relies on, and find the slices of data where it fails. Every example uses data that ships with scikit-learn or is generated in the notebook, and every Python cell on these pages was run to produce the numbers and charts you see. Each core module has a Notes lesson, a Build-along, and a Practice set with hints and worked solutions. The course ends with a capstone: a reproducible model-comparison report with a recommendation and its limitations.

Free completion promise: Every lesson can be completed for $0. Google Colab's free tier is enough for every notebook in the course, the libraries are open source, and every dataset either ships with scikit-learn or is generated by code on the page, so nothing has to be bought or downloaded.

What's inside

  • 24hand-written lessons
  • 13videos
  • 5step-through animations
  • 55diagrams, charts & live previews
  • 55quiz questions
  • 178code examples

Before you begin

Requirements & setup for Intermediate Machine Learning and Model Evaluation

Start with the complete free pathway below. Hardware, subscriptions, paid APIs, and cloud credits are never required.

Start here ยท free path

Your complete $0 setup

Every lesson can be completed for $0. Google Colab's free tier is enough for every notebook in the course, the libraries are open source, and every dataset either ships with scikit-learn or is generated by code on the page, so nothing has to be bought or downloaded.

$0 required

Setup checklist

0 of 9 complete

This checklist is a temporary setup aid and resets when the page reloads. Saved course progress begins in the setup lessons below.

  1. Everything required for this course is free. Paid software, APIs, cloud credits, GPUs, and physical equipment are optional.

    About 2 min
  2. Go to colab.research.google.com and sign in with a Google account (a personal account is the safe choice if your school account blocks Colab).

  3. Choose File > New notebook in Drive, then click the Untitled name at the top left and rename the notebook.

    About 5 min
  4. Run a cell that imports sklearn and prints sklearn.__version__.

    About 5 min
  5. If the version is older than 1.6, run %pip install -U scikit-learn in a cell, choose Runtime > Restart session, and check the version again.

    About 5 min
  6. Every lesson works in Google Colab (free) with scikit-learn, so Python 3.10+ with JupyterLab on your own computer is never required.

  7. If you have Python 3.10+ with JupyterLab on your own computer, use it where a lesson mentions it and compare your result with the lesson's.

    About 5 min
  8. If it doesn't match, finish that step in Google Colab (free) with scikit-learn and keep going.

    About 5 min
  9. Google Colab (free) with scikit-learn: Your version-check cell prints scikit-learn 1.6 or newer and ends with the line "Ready for the course", and the notebook appears in your Drive's Colab Notebooks folder. Python 3.10+ with JupyterLab on your own computer: Your version-check cell prints scikit-learn 1.6 or newer and ends with the line "Ready for the course", and the notebook appears in your Drive's Colab Notebooks folder.

    About 5 min

Software

1 item

Google Colab (free) with scikit-learn

Colab is Google's free hosted Jupyter notebook. Python runs on a Google machine and your notebooks save to your own Google Drive, so it works on any computer with a browser, Chromebooks included. scikit-learn, pandas, NumPy, SciPy, and matplotlib come preinstalled. The course needs scikit-learn 1.6 or newer, and the first lesson shows how to check your version and upgrade it inside Colab when needed.

Course need
Google Colab (free) with scikit-learn
Free

Colab is Google's free hosted Jupyter notebook. Python runs on a Google machine and your notebooks save to your own Google Drive, so it works on any computer with a browser, Chromebooks included. scikit-learn, pandas, NumPy, SciPy, and matplotlib come preinstalled. The course needs scikit-learn 1.6 or newer, and the first lesson shows how to check your version and upgrade it inside Colab when needed. Every lesson is readable text with copyable code, keyboard-friendly quizzes and step-throughs, and videos with YouTube captions.

  1. Go to colab.research.google.com and sign in with a Google account (a personal account is the safe choice if your school account blocks Colab).
  2. Choose File > New notebook in Drive, then click the Untitled name at the top left and rename the notebook.
  3. Run a cell that imports sklearn and prints sklearn.__version__.
  4. If the version is older than 1.6, run %pip install -U scikit-learn in a cell, choose Runtime > Restart session, and check the version again.

Hardware

1 item

Python 3.10+ with JupyterLab on your own computer

Optional. A local install works offline and has no session time limits; the first lesson has the steps for Windows, macOS, and Linux.

Optional
Google Colab (free) with scikit-learn
Free

Optional. Every lesson can be completed with Google Colab (free) with scikit-learn; Python 3.10+ with JupyterLab on your own computer is an extra for learners who have it. Optional equipment: every assessed outcome can be completed without it.

  1. Every lesson works in Google Colab (free) with scikit-learn, so Python 3.10+ with JupyterLab on your own computer is never required.
  2. If you have Python 3.10+ with JupyterLab on your own computer, use it where a lesson mentions it and compare your result with the lesson's.
  3. If it doesn't match, finish that step in Google Colab (free) with scikit-learn and keep going.

Accounts

Nothing required

No external account is needed for this course.

What you will be able to do

Learning outcomes

  • Build pipelines that engineer, impute, encode, and scale features from raw mixed-type rows, with custom transformers and no leakage between training and evaluation data.
  • Choose and justify a cross-validation scheme for independent, grouped, imbalanced, or time-ordered data, and report fold-to-fold variation instead of a single score.
  • Tune hyperparameters with randomized and successive-halving search, sensible distributions, and early stopping, and estimate the tuned model's performance with nested cross-validation.
  • Handle class imbalance and compare ensembles such as random forests and gradient boosting without leaking information.
  • Check calibration, explain what a model relies on, and find the data slices where it fails.
  • Write a reproducible model-comparison report that states a recommendation and its limitations.

Build real work

Assignments & capstone

Free tools accepted

Reproducible feature pipeline

In Colab, build a scikit-learn pipeline that turns raw columns into engineered features, pin every source of randomness with random_state, log each experiment to a CSV, and check each new feature with cross-validation before scoring raw rows.

Every lesson can be completed for $0. Google Colab's free tier is enough for every notebook in the course, the libraries are open source, and every dataset either ships with scikit-learn or is generated by code on the page, so nothing has to be bought or downloaded. Submit your project file, or screenshots with descriptions, or a short demo.

Tuned ensemble race with leak checks

Tune a gradient boosting model with early stopping and a randomized search sized to a time budget, race it against a random forest on the same folds, and check for leaks such as a column recorded after the outcome or groups split across folds.

Every lesson can be completed for $0. Google Colab's free tier is enough for every notebook in the course, the libraries are open source, and every dataset either ships with scikit-learn or is generated by code on the page, so nothing has to be bought or downloaded. Submit your project file, or screenshots with descriptions, or a short demo.

Final assessment

Rigorous model-comparison report

Compare up to three model families plus a baseline in a seeded Colab notebook, with a sealed test set, repeated cross-validation with nested tuning, leak checks, calibration, interpretation, and error slices, ending in a recommendation with specific limits. Deliverables: Notebook that passes restart-and-run-all, Plan written before any results, Unit tests for the evaluation code, One- to two-page write-up with a recommendation, and Five-slide presentation.

Prerequisites & pacing

Skills assumed

  • Python: functions, classes at a basic level, lists and dictionaries, and reading a traceback
  • pandas and NumPy basics: selecting columns, filtering rows, and array shapes
  • One complete scikit-learn workflow: train_test_split, fit, predict, and score
  • Classification metrics: accuracy, precision, recall, and ROC AUC

Recommended prior courses

These are advisory, not locks. If you already have the skills listed above, enroll directly.

Choose your pace

  • self paced: 12 weeks at 5 hours per week
  • weekly: 12 weeks at 5 hours per week

Part of this learning path

Course created by Zafir Shamsi.