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.

Paper — Machine learning evaluation06:20
78%Machine learning evaluation — marked7/9 marks · 06:20 taken

Explain how you would use standardisation and PCA safely when comparing models with cross-validation.

7/9

I 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.

An illustrative marked short-answer response on preventing data leakage.

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.

Oral — Bias, variance and regularisationMarked

Examiner

Explain the bias–variance trade-off and how you would diagnose overfitting in a supervised learning model.

2:183:00Mark answer
78%Bias, variance and regularisation — marked78/100 · Sound, with one missing diagnostic · 2:18 spoken of 3:00
Conceptual accuracy17/20

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.

Assumptions and limitations14/20

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.

Experimental design16/20

The proposed learning curves and regularisation comparison were appropriate.

ImproveMention cross-validation or repeated splits when the dataset is small.

Clear technical communication14/20

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.

A marked oral response on the bias–variance trade-off shows the score, platform criteria and a stronger model answer.
Start studying machine learning

Yours are written from your own notes, and the free plan needs no payment details.

Guides

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

Other subjects