Study guides
Machine Learning
5 guides for this subject — how to prepare, what to practise, and how to know it has gone in.
A written answer, marked
A question from a machine learning mock paper, answered and marked. From Machine Learning Practice Questions: 10 Worked Examples.
Explain how you would use standardisation and PCA safely when comparing models with cross-validation.
7/9I would split the data into cross-validation folds, standardise the features and apply PCA before fitting the model. The same transformation can then be used for the validation fold. This prevents the model from seeing the validation labels.
The answer correctly uses cross-validation and recognises that the transformation must be applied consistently. It does not explicitly say that the scaler and PCA must be fitted on the training portion of each fold, rather than on all the data before cross-validation.
Missed
−Fit the scaler and PCA on each training fold only.
−Apply the fitted transformations unchanged to that fold's validation data.
Model answerPlace standardisation and PCA in a pipeline with the predictive model. In each cross-validation split, fit the scaler and PCA using only the training portion of that split, then transform the validation portion using those fitted parameters. Compare the resulting validation scores, and finally refit the selected pipeline on all available training data before evaluating once on a held-out test set.
A spoken answer, marked
An examiner's question, answered out loud and marked criterion by criterion. From Machine Learning Viva Questions: A Practical Oral Method.
Examiner
Explain the bias–variance trade-off and how you would diagnose overfitting in a supervised learning model.
The answer correctly contrasted underfitting with overfitting and linked variance to sensitivity to the training sample.
ImproveState that bias and variance describe different components of expected generalisation error, rather than two model types.
The answer assumed that a train–validation comparison was available but did not discuss data leakage or noisy labels.
ImproveSay that a validation gap is informative only when the splits are appropriate and preprocessing is fitted within each training split.
The proposed learning curves and regularisation comparison were appropriate.
ImproveMention cross-validation or repeated splits when the dataset is small.
The explanation was ordered and understandable, but the recommendation arrived before the diagnostic evidence.
ImproveUse the order: symptom, likely cause, check, intervention.
A strong answerBias is error from an overly restrictive set of assumptions, whereas variance is sensitivity to the particular training sample. Overfitting is suggested when training performance is much better than validation performance, although the split must be representative and free from leakage. I would inspect learning curves, compare cross-validation results with the held-out test result, and check the labels and preprocessing pipeline. If variance is the problem, I could increase the effective training data, reduce model complexity, or increase regularisation, selecting the penalty strength using validation data rather than the test set.
Yours are written from your own notes, and the free plan needs no payment details.
Guides
- How to Study Machine Learning: A Practical GuideLearn how to study machine learning with a structured method for maths, algorithms, coding, evaluation and applied problem-solving.
- Machine Learning Study Plan: A Six-Week MethodA practical six-week machine learning study plan with weekly hours, revision tasks, coding practice, questions and progress checks.
- Machine Learning Flashcards: A Deck You Can StudyStudy a practical machine learning flashcard deck covering core algorithms, evaluation metrics, optimisation and preprocessing.
- Machine Learning Practice Questions: 10 Worked ExamplesWork through 10 machine learning practice questions on leakage, metrics, regularisation, trees, clustering, PCA and calibration.
- Machine Learning Viva Questions: A Practical Oral MethodPractise machine learning viva questions with structured stations on bias, evaluation and deployment, plus a method for improving weak answers.
Studying machine learning? Build your machine learning board from your own notes — the cards, papers and lectures are written from it. Free plan: 20 cards, a paper, a lecture and a viva to try.
Start on MySummaries