Cross validation in matlab

2 ビュー (過去 30 日間)
Lester Lim
Lester Lim 2013 年 1 月 30 日
編集済み: Greg Heath 2018 年 1 月 1 日
What are the steps to performing cross validation on labels of data to get the accuracy of the results?

採用された回答

Greg Heath
Greg Heath 2013 年 1 月 30 日
編集済み: Greg Heath 2018 年 1 月 1 日
Repeat until the parameter estimates converges
1.Randomly divide the data into 10 subsets
2.For each subset
a. Use the remaining 9 subsets to design a model
b. Test the model with the holdout subset
c. Update the average and standard deviation of
the holdout test set error.
d. If std < thresh1 or std < thresh2*avg, stop.
Hope this helps.
Thank you for formally accepting my answer.
Greg

その他の回答 (1 件)

Ilya
Ilya 2013 年 1 月 30 日
The Statistics Toolbox provides utilities for cross-validation. If you are using R2011a or later, take a look at ClassificationTree.fit, ClassificationDiscriminant.fit, ClassificationKNN.fit and fitensemble. Notice the 'crossval' parameter and other related parameters. If you are working in an older release or not using any of these classifiers, the crossval function is a generic utility for that purpose.
  1 件のコメント
Lester Lim
Lester Lim 2013 年 1 月 31 日
Is there any other way to do it without stats toolbox?

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by