Error in the brain tumor detection code

8 visualizzazioni (ultimi 30 giorni)
I am doing project on brain tumor detection classification.I run the code from the math work.I am getting about svmtrain and svmclassify and I changed the syntax of that but still I am getting errors.
ERROR:
Name Size Bytes Class Attributes
DWT_feat 31x124 30752 double
Name Size Bytes Class Attributes
G 124x30 29760 double
Error using classreg.learning.FitTemplate/fillIfNeeded (line 666)
kernel_function is not a valid parameter name.
Error in classreg.learning.FitTemplate.make (line 125)
temp = fillIfNeeded(temp,type);
Error in ClassificationSVM.template (line 235)
temp = classreg.learning.FitTemplate.make('SVM','type','classification',varargin{:});
Error in ClassificationSVM.fit (line 239)
temp = ClassificationSVM.template(varargin{:});
Error in fitcsvm (line 343)
obj = ClassificationSVM.fit(X,Y,RemainingArgs{:});
Error in BrainMRI_GUI>pushbutton2_Callback (line 181)
svmStruct1 = fitcsvm(xdata,group,'kernel_function', 'linear');
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainMRI_GUI (line 46)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainMRI_GUI('pushbutton2_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
code file is also attached

Risposta accettata

Walter Roberson
Walter Roberson il 22 Giu 2021
the parameter name is 'KernelFunction'
If this helps you then please go over to his Answer and vote for it, as he is the person who found the solution and wrote it up.
  2 Commenti
Susheela B
Susheela B il 22 Giu 2021
But still error exists.
Error:
Name Size Bytes Class Attributes
DWT_feat 31x124 30752 double
Name Size Bytes Class Attributes
G 124x30 29760 double
Error using ClassificationSVM (line 249)
Use fitcsvm to train an SVM model.
Error in BrainMRI_GUI>pushbutton2_Callback (line 182)
species = ClassificationSVM(svmStruct1,feat,'showplot',true);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainMRI_GUI (line 46)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainMRI_GUI('pushbutton2_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
the files are attached

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by