should I separate the data as training and testing when I use cross validation in ensemble methods? and is there any fully useful code? Thanks much.
1 次查看(过去 30 天)
显示 更早的评论
should I separate the data as training and testing when I use cross validation in ensemble methods? and is there any fully useful code? Thanks much.
0 个评论
回答(1 个)
Prantik Chatterjee
2024-3-21
I am assuming that you have access to the latest MATLAB release.
You do not need to separate the data as training and test if you use the matlab library function 'crossval' for cross-validation. 'crossval' will, by default, split the given dataset into 10 folds internally. Alternatively, you can specify the number of folds using the argument 'Kfold' with 'crossval'. Please refer to the following documentation for more details on 'crossval'
For a working example on using cross validation in ensemble methods, please refer to the following page
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classification Ensembles 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!