Question:

Figure below shows the scatterplot of training pixels of water (w), sand (s), forest (f) and commercial (c) in bands 1 and 2. Pixel ‘A’ having digital number 4 and 6 in band 1 and band 2, respectively, is to be classified using k-nearest neighbor classifier having the value of k equal to 5. The assigned class for the pixel ‘A’ is ____________

Show Hint

In k-NN classification, always select the k points with the smallest Euclidean distances, then assign the class with the majority vote among them.
Updated On: Apr 17, 2025
  • forest
  • sand
  • water
  • commercial
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

We need to use the k-nearest neighbor algorithm (k = 5) to classify pixel 'A' located at (4, 6) on the scatter plot.
Steps:
Measure the Euclidean distance from point 'A' to all labeled training points.
Select the 5 nearest points.
Count the class frequencies among these 5 nearest neighbors.
Assign the class with the highest frequency.

From visual inspection, the 5 nearest neighbors to point A (4,6) are:
(3,6) → water (w)
(3,5) → water (w)
(4,5) → sand (s)
(5,6) → sand (s)
(5,5) → sand (s)

Frequency of classes among nearest neighbors:
water (w): 2
sand (s): 3

Hence, the pixel 'A' is classified as sand.

Final Answer: \fbox{(B)}
Was this answer helpful?
0
0

Top Questions on General Science

View More Questions

Questions Asked in GATE GE exam

View More Questions