Leave-one-​out-crossv​alind

2 visualizaciones (últimos 30 días)
Abu Qusay
Abu Qusay el 28 de Jun. de 2015
Editada: Abu Qusay el 28 de Jun. de 2015
After extracting HOG features of some male and female pictures, I'm trying to use the Leave-one-out-method to classify my data. Due the standard way to write it in Matlab is:
[Train, Test] = crossvalind('LeaveMOut', N, M);
What I should write instead of N and M ? Also, should I write the code inside or outside a loop? this is my code, where I have training folder for Male (80 images) and female (80 images), and testing folder with (10 random images).
for i = 1:10
[Train, Test] = crossvalind('LeaveMOut', N, 1);
SVMStruct = svmtrain(Training_Set (Train), train_label (Train));
Gender = svmclassify(SVMStruct, Test_Set_MF (Test));
end
Notes:
  • Training_Set : an array contains HOG features of training folder images.
  • Test_Set_MF : an array contains HOG features of test folder images.
  • N : total number of images in training folder.
  • SVM should detect which images are male and which are female.

Respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by