A kNN example with k-fold cross validation
A kNN example with k-fold cross validation
Data Description: Given 800 Data with 5 attribute and 4 label / classes (0,1,2,3)
This is an example of kNN’s implementation with k-Fold cross valiadtion with k = 4. The data will be divide 600 for train and 200 for test. The data train and data test will be rotated. So the accuracy will be more reliable
*note: k = 4 is k value for k-fold cross validation, for k value of kNN it’s 7 and you can change it on the code (i’ve give comment on the code)