Azzera filtri
Azzera filtri

A X B Cross-validation.

1 visualizzazione (ultimi 30 giorni)
Basheer Alwaely
Basheer Alwaely il 25 Nov 2018
How to implement A X B Cross-validation and get the confusion matrix. For example, 5 times 2-fold Cross-validation.
I used this code to implement k-fold only
mdl = fitcknn(inputs,targets);
partModel = crossval(mdl, 'KFold', 5); % 5-fold cross validation
Accuracy = 1 - kfoldLoss(partModel, 'LossFun', 'ClassifError');
[validationPredictions, ~] = kfoldPredict(partModel);
Conf_Mat=confusionmat(targets',validationPredictions);

Risposte (0)

Categorie

Scopri di più su Statistics and Machine Learning Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by