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.
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.
- 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.
- 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.
- Classification Metrics: Beyond Accuracy — Evaluate classifiers with confusion matrices, precision, recall and F1, and understand why accuracy misleads on imbalanced data.
- Preprocessing Pipelines Without Leakage — Scale numbers, encode categories and impute missing values in a ColumnTransformer inside a Pipeline, so preprocessing never leaks test data.
- 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.
- 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.
- 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.
- Thresholds, Costs and Calibrated Probabilities — Turn predicted probabilities into decisions with a cost-based threshold, and check whether probabilities can be trusted with calibration.
- 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.
- 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.
- 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.