How to use 'crossval' without pretrained model?
6 views (last 30 days)
Show older comments
MathWorks Support Team
on 8 Sep 2022
Answered: MathWorks Support Team
on 13 Sep 2022
How can you generate a partitioned model using the 'crossval' function without creating a pretrained model first?
Accepted Answer
MathWorks Support Team
on 8 Sep 2022
This functionality is not supported by the 'crossval' function. However, one workaround is to use a fit function with the 'CrossVal' name-value argument specified.
For example, to directly generate a partitioned SVM model, you can run the following command:
CV_SVM_model = fitcsvm(X,Y,'CrossVal','on')
To read more about the cross-validation options for the ‘fitcsvm’ function, please refer to the following documentation page:
Similar steps can be taken with fit functions for other model types.
0 Comments
More Answers (0)
See Also
Categories
Find more on Classification Trees in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!