Error in the brain tumor detection code

8 ビュー (過去 30 日間)
Susheela B
Susheela B 2021 年 6 月 22 日
コメント済み: Walter Roberson 2021 年 6 月 22 日
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

採用された回答

Walter Roberson
Walter Roberson 2021 年 6 月 22 日
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 件のコメント
Susheela B
Susheela B 2021 年 6 月 22 日
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

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by