필터 지우기
필터 지우기

How to do Leave-One-Subject-Out in Matlab?

조회 수: 19 (최근 30일)
MA-Winlab
MA-Winlab 2019년 10월 14일
답변: Shishir Singhal 2020년 7월 29일
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

답변 (1개)

Shishir Singhal
Shishir Singhal 2020년 7월 29일
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,

카테고리

Help CenterFile Exchange에서 Classification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by