How to use this data science deck

Flashcards are useful when they test one decision or definition at a time. They are less useful when a card asks you to explain an entire machine-learning workflow. This deck focuses on fundamentals that recur across data science study: splitting data, avoiding leakage, choosing metrics and interpreting common models.

Work through the cards as a retrieval exercise. Read one question, answer it aloud or in writing, then reveal the answer. Choose a grade that reflects what you could recall before seeing it. If you recognised the answer only after reading it, that is not the same as retrieving it. Mark the card accordingly and return to it when it is due.

The deck is most useful if you connect each answer to an example from your own coursework or project. For instance, when a card asks about precision, name the real-world cost of a false positive in the problem you are studying. Keep the answer precise first; add context only after you can state the core fact accurately.

A board on this topic ends up looking like this:

Cards — Data Science Foundations18 due

What is the purpose of a validation set?

To compare candidate models or tune hyperparameters without using the final test set.

All 18 cards
What is the purpose of a validation set?To compare candidate models or tune hyperparameters without using the final test set.
What is data leakage?Information unavailable at prediction time, or information from the evaluation data, improperly influences model training or selection.
When should you fit a standardisation transform?Fit it on the training data only, then apply those learned parameters to validation, test and future data.
What is the z-score for a value x?z = (x − μ) / σ, where μ and σ are the mean and standard deviation used for scaling.
How is precision calculated?TP / (TP + FP): the proportion of predicted positives that are truly positive.
How is recall calculated?TP / (TP + FN): the proportion of actual positives that are correctly identified.
What is the F1 score?The harmonic mean of precision and recall: 2PR / (P + R).
Why can accuracy mislead on an imbalanced dataset?A model can predict the majority class for every case and still have high accuracy while missing the minority class.
What does ROC AUC measure?How well a model ranks positive cases above negative cases across classification thresholds; it does not select a threshold.
When can a precision-recall curve be more informative than ROC AUC?When the positive class is rare and performance on positive predictions is the main concern.
What does L1 regularisation encourage?A sparse coefficient vector; some coefficients can be driven to exactly zero.
What does L2 regularisation do to large coefficients?It penalises their squared magnitude and generally shrinks them towards zero without usually making them exactly zero.
What probability does logistic regression model for a binary outcome?The probability of the positive class, using the logistic sigmoid to map a linear score to the interval from 0 to 1.
What does changing a classification threshold do?It changes which predicted probabilities become positive labels, trading off measures such as precision and recall.
Why use grouped cross-validation for repeated records from the same person?To keep records from one person in a single fold and reduce leakage between training and validation folds.
What are the units of root mean squared error?The same units as the target variable, because RMSE is the square root of mean squared error.
How should you avoid leakage when median-imputing missing values?Calculate the median from the training data only, then use that fixed value to transform validation, test and future data.
What does correlation alone establish?An association between variables; by itself it does not establish that one variable causes the other.

That is a MySummaries deck, filled with data science material. Yours is written from your own notes. Start free

Study the answers, not just the cards

Move through the deck in small groups of four or five. After each group, pause and explain one answer in a concrete scenario. For example, if a fraud model has very few fraudulent transactions, ask what a high accuracy score could conceal. The answer is that predicting the majority class for every record might still look accurate while detecting none of the fraud cases.

Pay particular attention to the related metrics. Precision asks how many predicted positives are correct; recall asks how many actual positives were found. They are not interchangeable. The F1 score combines them using their harmonic mean, but it does not account for every real-world cost. If false negatives and false positives have different consequences, the decision threshold and the appropriate metric depend on the task.

Likewise, a high ROC AUC does not tell you which probability threshold to deploy. It summarises ranking performance across thresholds. You still need to select a threshold for the problem and assess the resulting errors. On a rare-positive problem, a precision-recall curve can make the trade-off on the positive class easier to inspect.

A common source of lost marks in assignments and interviews is describing a transformation correctly but applying it at the wrong point. The scaler and imputer cards both test the same discipline: learn preprocessing parameters from training data, then reuse them elsewhere. In cross-validation, repeat that fitting inside each training fold. If records from the same person can appear in multiple folds, ordinary random splitting may also give an overly optimistic estimate; grouped splitting addresses that specific risk.

The Must not miss core

Use this short checklist to check whether you have the essential ideas before you repeat the full deck. It is not a replacement for the cards: it helps you notice which ideas need another retrieval attempt.

A compact core checklist on this topic looks like this:

Must not miss coreData Science Foundations
Keep the final test set out of model selection; use validation data or cross-validation for comparisons and tuning.
Fit preprocessing steps such as scaling and median imputation on training data only; apply the learned transformation to other data.
Know the metric denominators: precision = TP/(TP+FP); recall = TP/(TP+FN); F1 = 2PR/(P+R).
Choose metrics and classification thresholds with class balance and the costs of false positives and false negatives in mind.

When reviewing, say the checklist item from memory before reading it. If you can recite a formula but cannot explain its denominator, revisit the relevant card and work through a small example. With precision, the denominator is all cases predicted positive. With recall, it is all actual positives. That distinction is often more durable than memorising the names alone.

Turn repeated errors into one next step

Repeatedly missing a card usually means the question is too broad in your mind, or that you have memorised a phrase without being able to apply it. Make the next review specific. For a missed metric, state its formula and then identify what goes in the denominator. For leakage, identify which information would not legitimately be available during training or prediction.

A remediation tray might bring back a question like this:

Remediation tray

You lost this mark twice: when fitting a scaler inside cross-validation, which data may be used to calculate its mean and standard deviation?

Add cardDismiss

Answer it in full: calculate those values using the training portion of that fold, then use them to transform its validation portion. Do not calculate them once using the complete dataset before splitting. That would allow information from the validation data to influence the transformation.

A practical review routine

Start with the full deck once, without trying to force a perfect score. On the next review, spend most of your time on cards you could not retrieve cleanly. After a few sessions, test yourself by explaining how the cards fit together: split the data correctly, fit transformations without leakage, evaluate with metrics suited to the problem, and choose a threshold based on the consequences of errors.

Keep your notes or project examples beside the deck, but answer before checking them. If a course uses a particular convention or adds assumptions, record that in your own study material and make a separate card for it. These cards cover general foundations; they do not replace the definitions and methods required by a specific course, dataset or project.

How MySummaries helps

MySummaries can turn your own data science notes into a revision board and generate a deck for spaced-repetition practice. Add course slides, PDFs or photographed notes, then use the resulting cards to revisit definitions and methods that you have actually studied. Open MySummaries.