SVM train and Classification Errors
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello Everyone im getting this weird error while im using svm train and classificationSvm. Need some help fixing it as i am new to this
Code Block: load Trainset.mat
xdata = meas;
group = label;
svmStruct = fitcsvm(xdata,group,'HyperparameterOptimizationOptions', struct('showplot',true), 'KernelFunction','rbf','KernelScale',0.5);
species = ClassificationSVM(svmStruct,feat,'showplot',true);
if strcmpi(species,'MALIGNANT')
helpdlg(' Malignant Tumor ');
disp(' Malignant Tumor ');
else
helpdlg(' Benign Tumor ');
disp(' Benign Tumor ');
end
set(handles.edit18,'string', species);
and the errors are
Error using ClassificationSVM (line 249)
Use fitcsvm to train an SVM model.
Error in untitled2>pushbutton12_Callback (line 615)
species = ClassificationSVM(svmStruct,feat,'showplot',true);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in untitled2 (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)untitled2('pushbutton12_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
Anybody has any idea in what im doing wrong? any help will be appreciated :)
0 comentarios
Respuestas (2)
Alan Weiss
el 23 de Abr. de 2019
Try removing the line
species = ClassificationSVM(svmStruct,feat,'showplot',true);
To learn how to use the resulting SVM, see the documentation for fitcsvm.
Alan Weiss
MATLAB mathematical toolbox documentation
0 comentarios
Furkan DEMIR
el 10 de Dic. de 2020
Hello.
load Trainset.mat has two file. one of these meas and label.
When I see meas files. I saw 20*13 matrix. what is the meaning. Why the file is 20*13 matrix
0 comentarios
Ver también
Categorías
Más información sobre Classification Trees en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!