K-NEAREST NEIGHBORS EXERCISE
Imaging objects in classes A and B having two numericattributes/properties that we map to X and Y Cartesian coordinatesso that we can plot class instances (cases) as points on a 2-Dchart. In other words, our cases are represented as points with Xand Y coordinates (p(X,Y)).
Our simple classes A and B will have 3 object instances (cases)each.
Class A will include points with coordinates (0,0), (1,1), and(2,2).
Class B will include points with coordinates (6,6), (5.5, 7), and(6.5, 5).
In R, we can write down the above arrangement as follows:
# Class A training object instances (cases)
A1=c(0,0)
A2=c(1,1)
A3=c(2,2)
# Class B training objects instances (cases)
B1=c(6,6)
B2=c(5.5,7)
B3=c(6.5,5)
How
PayPal Gateway not configured
PayPal Gateway not configured