Conversion to cell from ClassificationSVM is not possible

1 次查看(过去 30 天)
How to correct this error?
the code:
SVMModels=cell(5,1);
Y=GroupTrain;
classes=unique(Y);
rng(1);
for j=1:numel(classes)
indx=strcmp(Y',classes(j));%%Create binary classes for each classifier
SVMModels(j)=fitcsvm(DF,indx,'ClassNames',[false true],'Standardize',true,... %%ERROR!!!
'KernelFunction','rbf','BoxConstraint',1);
end

采纳的回答

Star Strider
Star Strider 2020-7-8
I cannot fun your code, however running something similar suggests to me that using curly braces {} to subscript ‘SVMModels’ could work:
SVMModels{j} = fitcsvm(DF,indx ...
.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by