How to get result for each k-fold cross validation

The function crossval returns the partitioned model and 10 trained models for a 10-fold cross validation, and kfoldloss calculates the loss. However, I want to see the accuracy of each trained models within the partitioned model, what should I do?

Answers (1)

SVM = fitcsvm(X,y,'KernelFunction', 'rbf', 'Standardize',true,'KernelScale', 'auto') ;
CVS = crossval(SVM);
classLoss = kfoldLoss(CVS, 'Mode', 'individual')

Asked:

on 25 Nov 2021

Answered:

on 8 Jun 2022

Community Treasure Hunt

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

Start Hunting!