c02 · E2

Derive: Learning a Rule From Examples

c02.E2.1E2 · expression

Let be a table of labelled examples whose feature vectors are all different. Let be an input that appears in no row of , and let be any label. Construct a predictor whose empirical risk on under the zero-one loss is zero and whose answer at is . Then explain what the construction shows about empirical risk minimisation over the class of all predictors.

This tier asks for a derivation, so there is no automatic checker. Write your answer, then open the worked solution and compare.

c02.E2.2E2 · numeric

A table holds rows with one feature. The one-neighbour rule is scored on the rows it stored, with distance ties broken by the smaller row index. Prove two claims. First, if every stored row has a different feature value, the training error is zero. Second, if some feature value repeats, row is wrong exactly when its label differs from the label of the first row that carries the same feature value. Use the second claim to compute the training error rate for the six rows , , , , , .

c02.E2.3E2 · expression

Two rows are stored: with label 0 and with label 1. A query sits at . The first feature is measured in some unit; multiply the first coordinate of every row, including the query, by a positive number . The second coordinate does not change. Find the value of at which the two stored rows are at the same distance from the query. State which label the one-neighbour rule returns at and at , with distance ties broken by the smaller index.

This tier asks for a derivation, so there is no automatic checker. Write your answer, then open the worked solution and compare.

Other tiers

E1 Practise · E3 Open

Every hint opened, solution viewed and answer checked is recorded in this browser only. See Progress to export or delete it.