K-nearest neighbour Classifier- Cross validation

13 visualizaciones (últimos 30 días)
dopedmind
dopedmind el 10 de En. de 2013
Comentada: PIRC el 30 de Ag. de 2023
Hi, I am working of classifiers. My problem is as follow:
train_labels = Nx1; train_data = NxD;
test_ labels = Mx1; test_data = MxD;
where, M>>N;
I am using Knn classifier and I have to find the classification accuracy by k-fold cross-validation. Any help?
  1 comentario
PIRC
PIRC el 30 de Ag. de 2023
which is helpful for identify the optimal K value and avoid overfitting, underfitting issues

Iniciar sesión para comentar.

Respuestas (1)

Tom Lane
Tom Lane el 11 de En. de 2013
This example illustrates k-fold cross validation for knn classification:
However, you ordinarily wouldn't divide your data into train/test sets if you were going to use cross-validation.

Community Treasure Hunt

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

Start Hunting!

Translated by