Error in LS-SVMLab ?

1 回表示 (過去 30 日間)
shawin
shawin 2023 年 7 月 7 日
コメント済み: shawin 2023 年 7 月 8 日
Hi,
kindly, i have an issue with lssvm tool toolbox, i am getting error !!
Please could you help ?
error
Dot indexing is not supported for variables of this type.
Error in tunelssvm (line 145)
if model.code(1) == 'c', % changed
Note
"I just used iris data"
the code :
load iris.dat
setosa = iris((iris(:,5)==1),:); % data for setosa
versicolor = iris((iris(:,5)==2),:); % data for versicolor
virginica = iris((iris(:,5)==3),:); % data for virginica
obsv_n = size(iris, 1);
X= iris(:,1:4);
Y=iris(:, 5);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
type = 'classification';
L_fold = 10; % L-fold crossvalidation
[gam,sig2] = tunelssvm({X,Y,type,[],[],'RBF_kernel'},'gridsearch', 'crossvalidatelssvm',{L_fold,'misclass'});
[alpha,b] = trainlssvm({X,Y,type,gam,sig2,'RBF_kernel'});
plotlssvm({X,Y,type,gam,sig2,'RBF_kernel'},{alpha,b});
  2 件のコメント
Cris LaPierre
Cris LaPierre 2023 年 7 月 7 日
There is no error in what you have shared. We need to see the code where the error occurs (line 145), as well as the code used to create your variable model.
shawin
shawin 2023 年 7 月 8 日
I update the code section

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by