Machine learning flashcards
Teach computers to learn patterns from data.
What is machine learning, in one plain sentence?
Teaching a computer by showing it many examples, instead of writing every rule by hand, so it can make good guesses about new cases.
Tap to turn over. Swipe right if you know it, left to see it again.
What you will learn
Start from zero
- What machine learning is and where you meet it4 cards
- Data words2 cards
- How a model learns4 cards
- Before and after this topic2 cards
Core basics
- Learning from examples instead of rules3 cards
- Kinds of learning and tasks3 cards
- Framing a problem2 cards
- Training and testing4 cards
- Judging a first model4 cards
- Preparing data2 cards
Next steps
- Loss and optimisation3 cards
- Classification metrics3 cards
- Validation and tuning3 cards
- Core models and explanations4 cards
- Preprocessing, features and pipelines3 cards
- Unsupervised learning2 cards
Go deeper
- Neural networks and deep learning4 cards
- Diagnosing models2 cards
- Leakage and honest splits4 cards
- Turning scores into decisions2 cards
- Choosing the right model3 cards
- Production and responsible ML4 cards
Final test and certificate
10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.
Take the final testAbout these cards
- Reviewed 26 October 2026
- Coversscikit-learn 1.9Python 3.13PyTorch 2.xXGBoost 3
Checked against
Machine learning at a glance
Machine learning teaches a computer to make good guesses by showing it many examples instead of writing every rule.
It is like a child learning fruit names: after seeing many named apples and bananas, he can name a new fruit with no rule book.
Words you will meet
- Data
- Recorded facts, usually a table of rows and columns
- Feature
- A detail you already know about an example, like a house's area
- Label
- The answer you want the computer to guess, like the price
- Model
- A formula with numbers the computer tunes from examples
- Training
- Letting the model guess, check its errors and adjust, many times
- Prediction
- The model's guess for a new example
- Test set
- Examples hidden during training, used to check the model fairly
- Accuracy
- The share of test answers the model got right
The steps
- 1. Start from zero (12 cards): What learning from examples means, the key words, and a model in three lines.
- 2. Core basics (18 cards): What ML is, features and labels, splits, your first model and data quality.
- 3. Next steps (18 cards): Loss, metrics, cross-validation, tuning, trees and pipelines.
- 4. Go deeper (19 cards): Leakage, imbalance, calibration, drift, fairness and shipping models.
All 12 cards in Start from zero
- What is machine learning, in one plain sentence?
- Teaching a computer by showing it many examples, instead of writing every rule by hand, so it can make good guesses about new cases.
- What problem does it solve that normal programs could not?
- Some jobs have too many rules to write, like spotting spam or reading handwriting. People wrote rule after rule, and the rules kept breaking as the world changed.
- Where do you already use machine learning every day?
- Spam filters, phone face unlock, video suggestions, map arrival times and the next-word hints on your phone keyboard all come from machine learning.
- What is an everyday picture of how a machine learns?
- A child sees many apples and bananas, each named by a parent. Soon he names a fruit he has never seen. Nobody gave him a rule list; he learned the pattern.
- What are data, rows and columns?
- Data is recorded facts, usually kept in a table. Each row is one example, such as one house, and each column is one detail about it, such as its area or city.
- What are features and a label?
- Features are the details you already know, like a house's area and city. The label is the answer you want the computer to guess, like the house price.
- What are a model, its parameters and a prediction?
- A model is a formula the computer builds from examples. Its parameters are the numbers inside it that get tuned. A prediction is the model's guess for a new example.
- What happens during training, and what is loss?
- Training means the model guesses on examples, measures how wrong it was (the loss, a wrongness score), and adjusts its numbers to be a little less wrong. This repeats many times.
- What are a test set and accuracy?
- You hide some examples during training, like keeping back exam questions. The test set checks the model on them, and accuracy is the share of answers it got right.
- Your first tiny win: what does this little model print?
- 55.0, meaning 55 lakh rupees. The parameters are 0.04 and 15, the feature is the area, and the printed prediction is the price. Training is just finding good numbers like these.
- What do you need before starting this topic?
- For the ideas, nothing at all. For the code cards, basic Python helps, and you can run it in any free online Python notebook in your browser.
- What will you be able to do after this topic?
- Turn a real question into a machine learning task, prepare the data, train and test a first model in Python, and tell whether its score is truly good.
Machine learning cheatsheet
scikit-learn core
model.fit(X, y)Learn from training datamodel.predict(X)Labels or valuesmodel.predict_proba(X)[:, 1]Positive-class probabilitytrain_test_split(..., stratify=y)Keep class mix in both setscross_val_score(pipe, X, y, cv=5)Five-fold scoresmake_pipeline(prep, model)Preprocessing and model as one objectColumnTransformer([...])Per-column preprocessing
Metrics
precisionTP / (TP + FP): are alerts right?recallTP / (TP + FN): did we catch them?F1Harmonic mean of precision and recallPR AUCRare-class ranking qualityROC AUCOverall ranking, flattering when imbalancedRMSE / MAERegression error; RMSE punishes big missesBrier scoreProbability calibration
Pick a model
Tabular, any sizeHistGradientBoosting, LightGBM, XGBoostNeed explanationsLogistic regression or a shallow treeSmall, clean baselineLogistic or linear regressionImages, text, audioFine-tune a pretrained neural netGroups, no labelsk-means or HDBSCANRare anomaliesIsolationForest
Split strategies
StratifiedKFoldClassification, keep class ratiosTimeSeriesSplitPast to train, future to validateGroupKFoldSame patient or user stays in one foldHold-out testTouched once, at the end
Symptom and fix
Train high, test lowRegularise, simplify, more dataBoth lowBetter features, more flexible modelToo-good scoreHunt for leakageRare class ignoredclass_weight, PR AUC, tune thresholdProbabilities offCalibratedClassifierCVLive accuracy fallsCheck drift, retrain on recent data