I am trying to find a good model to explain my dataset.
The problem is that I want to do leave-one-person-out cross validation which is not available in the Matlab Classification Learner App. So I trained different models (e.g. Tree
, SVM
, KNN
, LDA
) using functions like fitctee
, fitcsvm
, fitcknn
, and fitcdiscr
.
Following the leave-one-person-out
procedure I have found average classification accuracy of about 70% for the best model. However, when I use the App to model the data using 10-Fold cross validation
, it has much better accuracy and TPR
and TNR
about 98%.
This is really confusing that why this is happening! I was wondering if there are some steps I am missing when I do the modeling programmatically. Or is there any way to do what the App does by writing scripts and probably customizing the cross validation
scheme to leave-one-person-out
?