How to do Leave-One-Subject-Out in Matlab?
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi, guys
I would like to use Leave-One-Subject-Out for classiffication purposes. In my case, I have a dataset from 16 subjects, containing acceleration traces.
I would like to use binary SVM to see the classification accuracy with unseen subject. Thus I would like to train the SVM on the data from 15 users and test on the one left. I was able to split the data based on this, but in this case if I train on the data of the 15 users, the SVM does not know the label of the 16th one ! so it would not report the positive label (of the 16 th user) and rather than that it will find the closest label, which is the one of the 15 users (as all of them have same label in binary SVM).
Your help is appreciate
Thank you
0 comentarios
Respuestas (1)
Shishir Singhal
el 29 de Jul. de 2020
Hi,
Please refer to the documentation to implement "Leave one out cross validation": https://in.mathworks.com/help/stats/cvpartition.html#d120e209754
If all the data points have same label in train set, then it is highly likely that it would predict the same label for any test point. It is because your SVM thought that all the data points are belongs to the same distribution.
To solve this problem, it would recommend to increase the data size with some good ratio of positive and negative samples.
Thanks,
0 comentarios
Ver también
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!