Learning path
Next moduleModule 25: Computer vision and multimodal
Module 24
Applied ML in practice
The day-to-day craft of tabular ML: engineer features without leakage, handle rare positives, tune efficiently, forecast time series, and detect anomalies.
- 1. Feature engineeringTurn raw columns into model-ready features (scaling, log transforms, one-hot and target encoding, imputation with indicators, filter selection) without leaking the label.45 min
- 2. Imbalanced dataEvaluate a classifier on rare positives with precision, recall, F1, MCC, and AUPRC, build SMOTE and class weights from scratch, and see that resampling mostly moves the threshold.45 min
- 3. Hyperparameter tuningSearch hyperparameters efficiently with random search, successive halving, and Bayesian optimization, on log scales, and report an honest score with nested cross-validation.45 min
- 4. Time seriesForecast a series with lag features and walk-forward validation, beat naive and seasonal-naive baselines, and avoid the lookahead leaks that make time-series models look better than they are.45 min
- 5. Anomaly detectionFind rare, unusual points without labels using robust z-scores, IQR fences, k-NN distance, LOF, and isolation forests, then set thresholds from an alert budget and evaluate with the few labels you have.40 min
Most real ML work happens around the model: shaping features, choosing metrics that fit a skewed problem, spending a tuning budget wisely, and validating in a way that matches how the model will be used. This module covers those skills, each with from-scratch code you can run.
| Problem | Core skill | Classic failure |
|---|---|---|
| Raw columns | scale, encode, impute, select | target encoding or scaling fit on test data |
| Rare positives | AUPRC, thresholds, class weights | trusting accuracy at 99.9% negatives |
| Many knobs | random search, halving, Bayesian optimization | reporting the best search score as performance |
| Ordered data | lags, walk-forward validation, baselines | shuffled K-fold, centered rolling windows |
| No labels | robust stats, isolation forest, alert budgets | z-scores masked by the outlier itself |
| # | Lesson | You will be able to |
|---|---|---|
| 1 | Feature engineering | scale, log-transform, one-hot and target-encode, impute with indicators, filter features, and avoid target-encoding leakage |
| 2 | Imbalanced data | evaluate rare-positive classifiers with precision, recall, MCC, and AUPRC, and use class weights, SMOTE, and threshold tuning |
| 3 | Hyperparameter tuning | run random search, successive halving, and Bayesian optimization on log scales, and report nested-CV scores |
| 4 | Time series | build lag features, validate walk-forward, and beat naive and seasonal-naive baselines |
| 5 | Anomaly detection | score anomalies with robust z-scores, k-NN, LOF, and isolation forests, and set thresholds from an alert budget |