Free course · 11 lessons · Intermediate

Machine Learning Fundamentals for Engineers

Practical machine learning with scikit-learn for software engineers: the supervised learning workflow and baselines, regression and classification with the right metrics, preprocessing pipelines without leakage, cross-validation and tuning, tree ensembles and feature importance, overfitting and leakage, cost-based thresholds and calibration, clustering and anomaly detection, and shipping and monitoring models. Every example runs in your browser.

Start the course

1. Foundations: Models, Metrics and Pipelines

The supervised learning workflow, regression and classification with the right metrics, preprocessing pipelines that avoid leakage, and cross-validation and tuning.

  1. The Machine Learning Workflow — Frame a prediction problem, split data into training and test sets, fit a model, and always compare it with a simple baseline.
  2. Regression: Predicting Numbers — Predict numeric values with linear regression, measure errors with MAE, RMSE and R2, and read residuals to see where a model fails.
  3. Classification Metrics: Beyond Accuracy — Evaluate classifiers with confusion matrices, precision, recall and F1, and understand why accuracy misleads on imbalanced data.
  4. Preprocessing Pipelines Without Leakage — Scale numbers, encode categories and impute missing values in a ColumnTransformer inside a Pipeline, so preprocessing never leaks test data.
  5. Cross-Validation and Hyperparameter Tuning — Estimate performance reliably with k-fold cross-validation, tune hyperparameters with grid search, and keep a final test set untouched.

2. Better Models and Production Concerns

Tree ensembles and feature importance, overfitting and leakage, thresholds and calibration, clustering and anomaly detection, and shipping and monitoring models.

  1. Decision Trees, Random Forests and Gradient Boosting — Model non-linear relationships with trees and ensembles, compare them with linear models, and explain predictions with permutation importance.
  2. Overfitting and Data Leakage — Recognise overfitting from the gap between training and validation scores, and catch leakage from features that wouldn't exist at prediction time.
  3. Thresholds, Costs and Calibrated Probabilities — Turn predicted probabilities into decisions with a cost-based threshold, and check whether probabilities can be trusted with calibration.
  4. Clustering and Anomaly Detection — Find customer segments with k-means, choose the number of clusters with silhouette scores, and flag unusual transactions with Isolation Forest.
  5. Shipping Models: Validation, Versioning and Drift — Package a trained pipeline with metadata, validate prediction inputs, and detect data drift with statistical tests after deployment.

3. Capstone

Design a machine learning feature end to end.

  1. Capstone: Predict Delivery Times for an E-commerce Site — Design an ML system that predicts delivery dates at checkout: problem framing, data, features, model choice, evaluation, deployment and monitoring.

Was this page helpful?