How to apply knn classifier with k-fold cross validation.

2 vues (au cours des 30 derniers jours)
Emrah
Emrah le 9 Avr 2016
Hi. I have an HW but instructor wants us to solve it with MATLAB. However I am an R guy. So I am going to need your help a little.
The question wants us to use PCA on a data set which is done. Then it says;
_ Which one of these two PCA approaches are feasible for a real problem? Answer by considering how you would classify a new instance using the projections you obtained in a) and b) and using KNN5 classifier. The KNN5 (5 nearest neighbor classifier) labels a data point x as follows: Find the nearest (in terms of Euclidean distance) 5 points to x from the training set, label x as the majority of its 5 nearest neighbors’ label. (You should evaluate classification results using 10 fold cross validation)_
I have my two PCA results and I don't know how to apply knn5 on them with 10-fold cv. Can anyone tell me how to do it? Thanks in advance.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by