Classification · Machine Learning
11 questions · asked in 3 of 3 years (2024–2026)
MCQ 4 · MSQ 4 · NAT 31-mark 5 · 2-mark 6
2024Questions per year2026
Questions 11–11 of 11
Given the two-dimensional dataset consisting of 5 data points from two classes (circles and squares) and assume that the Euclidean distance is used to measure the distance between two points. The minimum odd value of in nearest neighbor algorithm for which the diamond () shaped data point is assigned the label square is ______.
Answer: 5
Distances from the diamond at to each point:
- circle :
- circle :
- square :
- square :
- square :
Taking the nearest points in order, then voting:
- : 1 circle, so the label is circle.
- : 2 circles and 1 square, so the label is circle.
- : 2 circles and 3 squares, so the label is square.
The smallest odd that gives square is .
Answer: 5
- circle :
- circle :
- square :
- square :
- square :
Taking the nearest points in order, then voting:
- : 1 circle, so the label is circle.
- : 2 circles and 1 square, so the label is circle.
- : 2 circles and 3 squares, so the label is square.
The smallest odd that gives square is .
Answer: 5
Keep practising