0

I am working on facial expression recognition. i made a dataset contain features & classes of 213 images.

  • Step1: Each row of my dataset represents the features of 1 image. so for 213 images 213 rows
  • Step2: the last column represents classes like; 1,2,3,4,5,6,7
  • Q1: when i run classification learner and the cross validation is checked the accuracy is very low.
  • Q2: when i run classification learner and the cross validation is not checked the accuracy is good for all classifiers.

I dont understand why? please help me? if someone has already experienced.

1 Answers1

0

This is called overfitting. If you don't cross-validate, your classifier is likely to learn the in-sample cases without being able to generalize.

To find out you need to have a training set, a test set (the cross-validation set), and a validation set to check how well does your classifier generalizes to new cases.

Marouen
  • 907
  • 3
  • 13
  • 36
  • if do have time please help me with this. classification learner takes only one file at at time. i import full dataset and run it. Can i divide training set, a test set.? Run it on both at a time or one. – Muhammad Kashif Sep 23 '18 at 04:49
  • i dont use any code iam using matlab classification learner app. – Muhammad Kashif Sep 23 '18 at 14:14
  • would you have a link for that app? – Marouen Sep 23 '18 at 18:01
  • 1
    its the matlab builtin app at the App tab. or u can read the docs. here... https://www.mathworks.com/products/statistics/classification-learner.html – Muhammad Kashif Sep 24 '18 at 06:20
  • I am not familiar with the app but I would say that you always have to stick with cross-validation. If your classifier performs poorly, tune the parameters of your model, try a different classifier (SVM, KNN etc..), try a different feature selection method, or a different cross-validation partition 3-fold vs 5-fold vs holdout etc.. – Marouen Sep 24 '18 at 08:01