A neighbour classifier stores all observations, including the row whose validation prediction is requested.
Is this a valid held-away evaluation?
Retrieve earlier concepts before combining them.
This practice: Retrieve earlier concepts before combining them. Next: Retrieval 2 · Neighbours, margins and rules retrieval.
Supporting concepts: Validate k on a meaningful scale → · Nonlinear SVM behaviour → · One-R with numeric inputs →
Remember the idea
Use the inputs and evidence to recover the method. Hints and explained solutions remain collapsed; exact phrasing is not graded.
Hint 1 — Think
Recall what a row’s distance to itself implies for neighbour retrieval.
Hint 2 — Tools
KNN fitting population and held-away rows.
Hint 3 — Approach
Trace whether the observation being evaluated is present among candidate neighbours.
Explained solution
That row could become its own neighbour, leaking evaluation information.
That row could become its own neighbour, leaking evaluation information.
Helpful prior knowledge: Validate k on a meaningful scale · Nonlinear SVM behaviour · One-R with numeric inputs These links are guidance, not locks.
Sources and API context
Examples run with this Playground’s scikit-learn 1.4.2 / Pyodide 0.26.4 runtime.