Reputation: 179
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?
Upvotes: 1
Views: 830
Reputation: 7116
You can use kfoldpredict
for this purpose. It operates on the ClassificationPartitionedModel
class. You can retrieve the classification loss using the allied kfoldloss
function.
Upvotes: 2