AI Wiki中文/EN

k-nearest neighbors

Change parameters and inspect the actual computation behind k-nearest neighbors.

0.7-2.4430.143-1.202-0.4140.039-0.9711.28-1.5282.5210: (-0.96, -0.911)1: (1.366, -0.704)2: (-0.882, -1.201)3: (1.842, -1.473)4: (-2.251, -0.427)5: (2.157, -0.396)6: (-1.738, -1.418)7: (2.125, -1.166)8: (-1.796, -1.041)9: (1.896, -0.711)10: (-2.411, -1.528)11: (1.947, -0.964)12: (-0.435, -0.956)13: (2.521, -0.932)14: (-2.443, -1.092)15: (1.8, -0.003)16: (-1.815, -0.268)17: (2.24, -1.442)18: (-2.133, -0.634)19: (1.09, -0.931)20: (-1.964, -0.886)21: (1.845, -0.899)22: (-1.903, 0.06)23: (1.055, -0.624)24: (-2.295, -0.195)25: (2.004, -1.021)26: (-1.926, 0.086)27: (1.17, -0.264)28: (-2.387, -0.959)29: (1.003, -0.566)query: (0, 0.7)query
2Predicted class
2Votes for class 0
3Votes for class 2
Euclidean distance and majority voting; the query y is fixed at 0.7. Feature scales affect distances, so fit scaling on training data in practical applications.
Use this experiment to test your understanding

Predict the effect of changing a parameter before inspecting the output. Identify the responsible term in the formula and explain how the teaching model differs from a real application.

Explore the related topic:k-nearest neighbors →
No matches. Try a synonym or acronym.

0 results shown

Wrap the whole query in double quotes for a phrase match.