使用svmtrain出错。
Show older comments
[/size][/backcolor][size=12px]data = [176 70;[/size][/color][color=#999999][size=12px]180 80;[/size][/color]
[color=#999999][size=12px]161 45;[/size][/color]
[color=#999999][size=12px]163 47];[/size][/color]
[color=#999999][size=12px]label = [1;1;-1;-1];[/size][/color]
[color=#999999][size=12px]
[/size][/color]
[color=#999999][size=12px]model = svmtrain(label,data);[/size][/color]
[color=#999999][size=12px]
[/size][/color]
[color=#999999][size=12px]testdata = [190 85];[/size][/color]
[color=#999999][size=12px]testdatalabel = -1;[/size][/color]
[color=#999999][size=12px]
[/size][/color]
[color=#999999][size=12px][predictlabel,accuracy] = svmpredict(testdatalabel,testdata,model);[/size][/color]
[color=#999999][backcolor=rgb(242, 242, 242)][size=12px]
Error using svmtrain (line 233)
Y must be a vector or a character array.
Accepted Answer
More 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!