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

54 ビュー (過去 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
jaypal singh
jaypal singh 2020 年 6 月 13 日
Hi
Anish
Do you have MATLAB code to perform 10 fold CV and produce ACC , sen spe of each fold.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInstall Products についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by