Question: Training Dataset: table [ [ , x , y , Class Label ] , [ Point 1 , 0 , 3 , Positive ]

Training Dataset:
\table[[,x,y,Class Label],[Point 1,0,3,Positive],[Point 2,1,3,Positive],[Point 3,2,2,Positive],[Point 4,1,1,Positive],[Point 5,3,1,Negative],[Point 6,3,2,Negative],[Point 7,4,1,Negative],[Point 8,4,2,Negative]]
Manhattan Distance (grid distance) between two points is the sum of the absolute difference between the coordinates:
Distance (p,q)=L1(p,q)=i=1d|pi-qi|
Consider the testing point (2,1), using KNN classifier with k=3, and the manhattan distance as the distance measure, what is the predicted class label of the testing point.
Distances =
\table[[,Point1,Point2,Point3,Point4,Point5,Point6,Point7,Point8],[Distance,,,,,,,,],[Label,,,,,,,,]]
What is the predicted class label for the same testing point (2,1) when using k=5
Training Dataset: \ table [ [ , x , y , Class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!