1. Explore the controls
Change the inputs and observe the model's response.
Classify a sample against points 1:A, 3:A, 6:B, 8:B, 10:B. Ties in distance use listed order.
Change the inputs and observe the model's response.
find k closest points; majority voteAdjust the controls to obtain the following output. Multiple valid solutions may exist.
At k=5, B always has the majority.
Simplified educational model. No real hardware is controlled. Code examples are illustrative and not executed as arbitrary programs.