Crossvalidate (SVM)-classifier

1 回表示 (過去 30 日間)
MiauMiau
MiauMiau 2017 年 9 月 3 日
Hi, I have the following code which runs fine as long as I have "crossval" set to "off". However, I would like to crossvalidate my data - but unfortunately then this piece of code throws an error - what exactly am I missing? Data files attached for reproducibility
kernel = 'linear'; C = 1;
cl = fitcsvm(datatrain,theclasstrain,'KernelFunction',kernel,...
'BoxConstraint',C,'ClassNames',[-1,1],'Crossval','on');
[label,scores] = predict(cl,datatest);

回答 (0 件)

カテゴリ

Help Center および File ExchangeResampling Techniques についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by