If run the classifications learner, get the results, close down the classification learner, immediately open up classification learner again (same data is kept in the work-space, nothing has changed or reloaded), and run the classification again. Why are different results yielded?

 Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 8 Mai 2026
Modifié(e) : MathWorks Support Team le 8 Mai 2026
The reason for the different results is by using k-fold cross-validation method.
When starting a new session in the Classification Learners App, the default validation method under the 'Step 3' section is 5 folds cross-validation.
This means that MATLAB will randomly partition all of the selected data into 5 equally sized sub-samples. Then it uses 4 partitions to train a model and use the 1 partition left for testing/validation.
The cross-validation process is then repeated 5 times, with each of the 5 sub-samples used exactly once as the validation data.
Therefore, when starting a new session each time, the data will be randomly partitioned into different sub-samples and will have different results.
Refer to the following link for more information on selecting validation method in MATLAB:

Plus de réponses (0)

Catégories

Produits

Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by