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?
2 次查看(过去 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!