Skip to content
Cheat sheets/Machine learning

Machine learning

Build models that hold up outside the notebook — from the first baseline to live monitoring.

A working checklist from framing to monitoring

11 MIN29 ENTRIES6 GROUPSUPDATED 2026-11-18

What you'll take away

Frame the problem and choose a metric that matters

Avoid leakage and evaluate your model honestly

Ship, monitor and know exactly when to retrain

29 entries · click a command to copy

01

Frame the problem

Write down exactly what the model predicts and at what time.

Beat a simple rule or majority-class predictor before adding complexity.

Ensure no information from the future enters training features.

Choose one primary metric tied to the business decision.

02

Prepare data

Keep a final test set untouched until the model is chosen.

Estimate stability by rotating which fold is held out.

One-hot or target-encode categorical features inside the pipeline to avoid leakage.

Standardise or normalise when distance or gradients matter.

Impute within each fold, not on the full dataset.

03

Model families

Fast, interpretable baselines for numeric and linear-ish problems.

Rule-like models that handle non-linear thresholds and mixed features.

Bagged trees that reduce variance and resist overfitting.

Sequentially corrects errors; strong on tabular data.

Effective in high-dimensional spaces with clear margins.

Partition unlabelled data into K clusters by distance.

Useful for unstructured data (text, images, audio) or very large datasets.

04

Evaluate honestly

Precision measures false positives; recall measures missed positives; F1 balances them.

Ranking quality; PR-AUC is more informative on imbalanced data.

MAE is robust to outliers; RMSE penalises large errors more.

See exactly which classes are confused.

Check whether predicted probabilities match observed frequencies.

05

Imbalance and tuning

Penalise mistakes on the rare class more heavily.

Rebalance training data — never resample the test set.

Move the decision threshold to match the cost of each error type.

Systematic hyperparameter exploration with cross-validation.

06

Ship and monitor

Reproducibility requires all three, not just the weights.

Run the model alongside the old process before it makes live decisions.

Watch feature and prediction distributions for change.

Retrain on a schedule or when performance drops below a threshold.

§ CREDITSource and curation

This sheet was curated from reference material in the Skyware AI technical library (DS/ML cheat sheets (Avi Chawla)). Command syntax is factual; explanations, grouping and examples were written by our engineering team. Always verify syntax against your tool or database version.