To evaluate the performance of the KNN algorithm (using Euclidean distance metric), implement a leaveone-
out evaluation routine for your algorithm. In leave-one-out validation, we repeatedly evaluate the
algorithm by removing one data point from the training set, training the algorithm on the remaining data set
and then testing it on the point we removed to see if the label matches or not. Repeating this for each of the
data points gives us an estimate as to the percentage of erroneous predictions the algorithm makes and
thus a measure of the accuracy of the algorithm for the given data. Apply your leave-one-out validation with
your KNN algorithm to the dataset for Question 1 c) for values for K of 1, 3, 5, 7, 9, and 11 and report the
results. For which value of K do you get the best performance?
(( 1.5963600450124, 75.717194178189, 23), W )
(( 1.6990610819676, 83.477307503684, 25), M )
(( 1.5052092436, 74.642420817737, 21), W )
(( 1.5738635789008, 78.562465284603, 30), M )
(( 1.796178772769, 74.566117057707, 29), M )
(( 1.6274618774347, 82.250591567161, 21), W )
(( 1.6396843250708, 71.37567170848, 20), W )
is cartesian distance and euclidean distance is same?
------------------------------
Rajeshree Patil
------------------------------
#GlobalAIandDataScience#GlobalDataScience