Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.A recipe, not just an oven
Baking a cake is more than the oven. You decide what cake you want, buy ingredients, throw away the bad eggs, measure everything the same way, bake, taste, and write down the recipe so you can bake it again. Machine learning is the same: the training algorithm is the oven, and most of the work, and most of the mistakes, happen before and after it.
In industry and in mission operations, models fail far more often because of a broken workflow (leaked test data, a missing-value bug, a sensor recalibrated after deployment) than because of a poor algorithm. A reliable workflow is what makes a model trustworthy.
- 1. Which part of ML takes most of the work in practice?
- 2. In the demo, which step made the biggest difference?
- 3. Why write down the recipe (save the model and steps)?
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.The stages
- Frame the problem: what decision will the prediction support? Which metric matters, and what is the cost of each error? What does success look like, and what is the baseline (current practice or a trivial model)?
- Collect and understand the data: sources, units, sampling, label quality; exploratory analysis (C1.7).
- Clean: fix types, remove duplicates, handle missing values and outliers, align time zones and units.
- Split before any fitting: train / validation / test, respecting groups and time (D0.3, D0.4).
- Engineer features: scaling, encoding, transforms, domain features, all fitted on training data only (D0.12).
- Train baselines, then models; tune hyperparameters on validation data (D0.13).
- Evaluate once on the test set, with the right metric and uncertainty; analyse errors by segment.
- Deploy: package the preprocessing and the model together, version both (C7.5), and serve them.
- Monitor and retrain: watch input drift, prediction drift and performance; retrain on schedule or on alarm.
from sklearn.pipeline import make_pipeline
from sklearn.impute import SimpleImputer
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LogisticRegression
import joblib
pipe = make_pipeline(SimpleImputer(strategy="median", add_indicator=True), StandardScaler(), LogisticRegression())
pipe.fit(X_train, y_train); print(pipe.score(X_test, y_test))
joblib.dump(pipe, "model.joblib") # preprocessing and model saved as one object- 1. When should you split the data?
- 2. A baseline is…
- 3. Why save preprocessing with the model?
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 35 minUndergraduate students and practising engineers.Artefacts and pitfalls per stage
| Stage | Artefact | Common failure |
|---|---|---|
| framing | metric, cost matrix, baseline | optimising accuracy when errors have unequal costs |
| data | data card / schema | silent unit changes, label noise |
| split | index files, seeds | random split of grouped or time-ordered data |
| features | fitted transformers | fitting scalers or imputers on all data (leakage) |
| training | model, config, logs | no baseline; tuning on the test set |
| evaluation | report with intervals | a single number, no error analysis |
| deployment | versioned pipeline | different preprocessing in production (training–serving skew) |
| monitoring | dashboards, alerts | no drift detection |
Missing values can carry information (a sensor fails when hot); an indicator column lets the model use it. Scaling matters for gradient-based and distance-based models: with features differing by 10⁴ in scale, the largest stable gradient step is set by the largest feature, so the others barely move.
- 1. Training–serving skew means…
- 2. Why add a 'was missing' column?
- 3. Unscaled features slow gradient descent because…
Level 3: Advanced
★★★★☆ Advanced⏱ 30 minGraduate level, with full derivations and proofs.Making workflows reliable
- Pipelines as code: scikit-learn
Pipeline, DVC stages (C7.5), Airflow or Prefect for scheduled retraining. - Experiment tracking: log data version, code commit, parameters, metrics and artefacts (MLflow, Weights & Biases).
- Tests for ML: schema checks on inputs, invariance tests (renaming a satellite does not change predictions), minimum-performance gates before deployment.
- Monitoring: population stability index or KS tests on inputs, calibration checks, delayed-label evaluation; define retraining triggers.
- Documentation: model cards and data sheets.
Interview questions. Walk through how you would build a churn or failure model. (Framing → data → split → baseline → features → model → evaluation → deployment → monitoring.) What would you do if offline accuracy is high but production performance is poor? (Check skew, leakage, drift, label delay.)
- 1. Offline 95% accuracy but 70% in production; first suspect?
- 2. A model card documents…
- 3. Experiment tracking should record…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.Which steps matter? An ablation
Exercise 1. On 400 machines with 10% missing cells, the full NumPy workflow reaches 0.73 test accuracy against a 0.50 majority baseline. Predictions are identical after saving to JSON and reloading, and a new reading with a missing value is handled by the stored imputer.
Exercise 2: adding one step at a time. Failure prediction with 600 training and 3 000 test machines; 10 random datasets. The data have temperatures missing more often when hot, a log-normal current reading whose effect is logarithmic, a feature in the tens of thousands, and three noise columns.
| Pipeline | Test accuracy | Log-loss |
|---|---|---|
| majority baseline | 0.496 | 0.694 |
| drop incomplete rows, raw features | 0.502 | 0.688 |
| + median imputation (raw scales) | 0.501 | 0.685 |
| + standardisation | 0.733 | 0.525 |
| + log of the skewed feature | 0.742 | 0.510 |
| + missing-value indicators | 0.765 | 0.483 |
| + L2 strength tuned on validation | 0.765 | 0.484 |
Without scaling, the operating-hours column limits the stable gradient step to about 10⁻⁸, so 300 epochs barely move the model and it is no better than guessing. Standardisation alone adds 23 points. The log transform matches the true effect shape (+0.9 points). The indicators let the model use the fact that a missing temperature signals a hot machine (+2.3 points). Tuning regularisation changes nothing, because 600 examples and 9 features leave little to regularise. The steps that mattered were data handling, not the model.
The workflow in AI, robotics and aerospace
- Predictive maintenance: telemetry → features → failure model → alerts, with retraining as hardware ages.
- Perception models on robots: data collection campaigns, labeling, versioned datasets, on-device deployment and field monitoring.
- Space missions: onboard models must be validated before upload; ground pipelines retrain with new downlinked data.
- MLOps standards: CRISP-DM and modern MLOps practices formalise these stages.
References
- C. Shearer (2000). “The CRISP-DM model: the new blueprint for data mining.” Journal of Data Warehousing 5(4).
- D. Sculley et al. (2015). “Hidden technical debt in machine learning systems.” NeurIPS.
- E. Breck et al. (2017). “The ML test score: a rubric for ML production readiness and technical debt reduction.” IEEE Big Data.
- M. Mitchell et al. (2019). “Model cards for model reporting.” FAT*.
- A. Géron (2022). Hands-On Machine Learning with Scikit-Learn, Keras and TensorFlow, 3rd ed., chapter 2. O’Reilly.