IAI Actuarial Core Principles · Risk Modelling and Survival Analysis · Elementary principles of machine learning
A dataset is split into training, validation and test sets to choose the number of neighbours k in a k-nearest-neighbours model. What is the correct use of the test set?
The test set should be used only once, after k has been chosen on the validation set, to give an unbiased estimate of performance on unseen data. Using it to choose k would leak information and make the estimate optimistically biased.
- AChoosing the value of k that minimises test error
- BFitting the model parameters alongside the training set
- CTuning k and then retraining on the test set
- DProviding a final unbiased estimate of performance after k is chosen using the validation setCorrect
- Replacing the validation set whenever it is too small
Explanation
Hyperparameters such as k are tuned on the validation set. The test set must remain untouched until the end so that it gives an unbiased estimate of out-of-sample performance. Using it to select k would make the estimate optimistic.
Did you get it right without looking?
One question tells you little. A timed set on Elementary principles of machine learning shows your real accuracy, how long you take and where you lose marks.
More Elementary principles of machine learning questions
- A modeller fits polynomial regressions of increasing degree to the same training data. The training error falls steadily with degree, but th…
- In ridge regression, a penalty equal to a positive constant λ times the sum of squared coefficients is added to the residual sum of squares.…
- An insurer has a dataset of past motor policies, each labelled with whether a claim was made, and wants a model to predict claims for new po…
- A model is fitted with a penalty on the sum of squared coefficients, with penalty weight λ. Training error is 4.0 at λ=0 and validation erro…
- An analyst at an Indian insurer uses 5-fold cross-validation on 1,000 policies to choose a tuning parameter. How many policies are used to t…
- A classifier is tested on 200 policies, of which 40 are actual fraud cases. It flags 50 policies as fraud, and 30 of these are genuinely fra…