How to solve error when using fitcsvm to replace svmtrain ?

2 views (last 30 days)
There is error, when I try to replace svmtrain using fitcsvm as follow, anyone know how to solve it?
model = svmtrain(labelVecBinTrain,featureMatTrain,['-t 0 -b 1 -w1 1 ' '-w-1 ' num2str(unbalanced_weight) ]);
model = fitcsvm(labelVecBinTrain,featureMatTrain,['-t 0 -b 1 -w1 1 ' '-w-1 ' num2str(unbalanced_weight) ]);
Error using internal.stats.parseArgs
(line 42)
Wrong number of arguments.
Error in
classreg.learning.paramoptim.parseOptimizationArgs
(line 10)
[OptimizeHyperparameters,HyperparameterOptimizationOptions,~,RemainingArgs]
= internal.stats.parseArgs(...
Error in fitcsvm (line 339)
[IsOptimizing, RemainingArgs] =
classreg.learning.paramoptim.parseOptimizationArgs(varargin);
Error in mainAuthentication (line
224)
model =
fitcsvm(labelVecBinTrain,featureMatTrain,['-t
0 -b 1 -w1 1 ' '-w-1 '
num2str(unbalanced_weight) ]);

Answers (0)

Categories

Find more on MATLAB 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!