Is it possible to perfrom cross validation for k = 1 fold (or 1 fold cross validation)

47 次查看(过去 30 天)
In Matlab 2018. I have used cross-validation method. in Classfier learner app I found that cross validation is given for fold 2- fold 5. I want to perform K=1 fold .

采纳的回答

Anish Walia
Anish Walia 2020-6-11
Though it is possible but it does not have any meaning
In K-Fold cross validation method, we divide the data in K folds. Then we use K-1 folds for training it and evaluate/test it on the 1 fold and then repeat it K times with unique fold for evaluating in each iteration.
So K-Fold cross validation on 1 fold would mean dividing data in 1 fold and using 0 (K-1) fold for training, which basically means not training and just testing on that fold
  5 个评论
Anish Walia
Anish Walia 2020-6-11
Okay so i suppose you misunderstood the problem.
The problem just needs 10 fold cross validation.
So divide the data in 10 folds, and basically plot the sensitivity for each fold.
Retain one fold as hold out, train on remaining 9 and plot the sensitivity for the hold out fold.
Then retain another unique fold as hold out, train on remaining 9 and plot sensitivity for this fold as fold 2 in graph
Similiarly repeat this 10 times with taking unique hold out folds and plot as fold 3, fold 4...., fold 10

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by