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?

 採用された回答

MathWorks Support Team
MathWorks Support Team 2026 年 5 月 8 日
編集済み: MathWorks Support Team 2026 年 5 月 8 日

1 投票

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:

その他の回答 (0 件)

カテゴリ

製品

リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by