I'm trying to make a svm classificator using Matlab and want to use cross validation. But
predictor = fitcsvm(features, vect, 'Standardize', true, 'CrossVal', 'on');
returns ClassificationPartitionedModel
and function predict
can not operate with predictor belongs to this class. So, how should I do predictions using ClassificationPartitionedModel
predictor?
Asked
Active
Viewed 821 times
1

Vladimir
- 179
- 9
1 Answers
2
You can use kfoldpredict
for this purpose. It operates on the ClassificationPartitionedModel
class. You can retrieve the classification loss using the allied kfoldloss
function.

Nitish
- 6,358
- 1
- 15
- 15