multisvm T value error

1 回表示 (過去 30 日間)
Prashant Saini
Prashant Saini 2021 年 3 月 20 日
回答済み: Thirumala Lakshmi K 2023 年 7 月 28 日
function [itr] = multisvm(T,C,testselectfea)
u=unique(C);
N=length(u);
c4=[];
c3=[];
j=1;
k=1;
if(N>2)
itr=1;
result=0;
cond=max(C)-min(C);
while((result~=1)&&(itr<=length(u))&& size(C,2)>1 && cond>0)
c1=(C==u(itr));
newClass=c1;
SVMModel = fitcsvm(T,newClass,'Kernel_Function','rbf','Method','QP');
result = predict(SVMModel,testselectfea);
for i=1:size(newClass,2)
if newClass(1,i)==0
c3(k,:)=T(i,:);
k=k+1;
end
end
T=c3;
c3=[];
k=1;
% This is the loop for reduction of group
for i=1:size(newClass,2)
if newClass(1,i)==0
c4(1,j)=C(1,i);
j=j+1;
end
end
C=c4;
c4=[];
j=1;
cond=max(C)-min(C);
if result~=1
itr=itr+1;
end
end
end
end
what value should i assign to T
I' m trying to do it for brain tumor
any solution urgent assist plz
error
>> multisvm(T, C, tst)
Undefined function or variable 'T'.

回答 (2 件)

Thirumala Lakshmi K
Thirumala Lakshmi K 2023 年 7 月 28 日
T is the training data

Thirumala Lakshmi K
Thirumala Lakshmi K 2023 年 7 月 28 日
That is, T is the extracted features to train the classifier

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by