76 exam-style questions on Machine learning with answers and explanations. Six real samples below — the full set is free with an account.
A postal company wants software that reads handwritten postcodes. Rather than a programmer stating a rule for every possible shape, the company supplies thousands of scanned postcodes together with the characters they contain. Which statement best describes why this is a machine learning approach?
Answer: The rules separating one character from another are derived from the supplied examples.
Machine learning is defined by where the rules come from: the model infers them from data instead of receiving them from a programmer. Storing and retrieving the examples unchanged would be a lookup, not learning.
An online grocer holds two years of purchase records but has never sorted its customers into any categories. It now wants software to find groups of customers who shop in similar ways. Which description fits this task?
Answer: Unsupervised learning, because the groups are not known before the data is examined.
No correct output exists for any customer, so nothing can supervise the algorithm; the structure has to be discovered in the inputs alone. A purchase history is a set of features, never a label.
A model reaches 99 % accuracy on the data it was trained with but only 62 % on a fresh sample drawn from the same population. Which explanation is the most likely?
Answer: The model has overfitted, learning detail that is specific to the training examples.
A large gap between training and unseen performance is the signature of overfitting: the model has memorised noise that does not repeat. Underfitting would show poor accuracy on both sets, not on one.
A screening model is built from 990 healthy patients and 10 patients with a rare condition. It predicts 'healthy' for every patient and is reported as 99 % accurate. Which statement about this result is correct?
Answer: Its recall on the rare condition is 0, so accuracy hides that it finds no cases.
With a 99:1 class split the majority-class guess scores 99 % while being useless, so accuracy is exactly the wrong measure. Recall on the rare class exposes the failure because the model finds none of the 10 cases.
The table records how a two-class classifier performed on 200 test samples. Calculate its precision for the positive class.
Answer: 0.75
Precision looks only at what the model flagged: 60 samples were predicted positive and 45 of them really were, so 45 / 60 = 0.75. The value 0.64 is the recall (45 / 70) and 0.80 is the accuracy (160 / 200).
A school wants a model that predicts the mark a student will obtain in a 100-mark examination from their homework record. Which type of task is this?
Answer: Regression, because the quantity predicted is a number on a continuous scale.
The task is decided by the output: a numerical quantity on a scale means regression, even though the marks happen to be whole numbers. Treating each mark as its own class would throw away the ordering between 61 and 62.
76 Machine learning questions — free with an account. Spaced repetition, streaks and full exam simulations included.
Practise them freeThis platform is independently developed and is not endorsed by, affiliated with, or sponsored by the International Baccalaureate Organization. “International Baccalaureate” and “IB” are registered trademarks of the IBO.