Leaving one out is not supported in the Learner app because it may have significant runtime, but it is supported in the programmatic version of crossval, just pass it 'leaveout',1, see doc on using crossval.
Classification learner APP, why is there no leave one out option?
3 ビュー (過去 30 日間)
古いコメントを表示
Dear machine learning experts,
I am using the classification learner APP to easily run all algorithms at the same time.
First you have to choose if you want to do Holdout or k-fold but there is no option for leave one out (max number of k-fold = to 50 if I remember correctly).
So, what I have been doing is the following, please tell me if it makes sens:
I selected k-fold (with 5 k, whatever no importance), then I exported the code from the APP and replaced k by the number of line in my training data.
% Perform cross-validation
%rng('default');
partitionedModel = crossval(trainedClassifier.ClassificationEnsemble, 'KFold', machine.K_fold);
% Compute validation predictions
[validationPredictions, validationScores] = kfoldPredict(partitionedModel);
% Compute validation accuracy
validationAccuracy = 1 - kfoldLoss(partitionedModel, 'LossFun', 'ClassifError');
machine.K_fold being now equal not to 5 anymore but to the number of line present in my training data.
Does it do the job correctly ?
Many thanks in advance,
Pierre
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Classification Learner App についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!