필터 지우기
필터 지우기

Support Vectors are wrong in my SVR model

조회 수: 1 (최근 30일)
hu yang
hu yang 2016년 8월 28일
답변: Jo 2023년 10월 26일
I trained an SVR model by fitrsvm. Since I need to get all support vector I have checked the model ouput. Surprisingly, the mdl.SupportVectors have nothing in common with my input mdl.X. Can anyone tell me why.
Below is my code. sorry the csv files are too larged to be uploaded.
input = csvread('sample.csv');
target = csvread('target.csv');
Y = log(target(2,:)+1)';
%Y = log(target(2,:)+1)';
%turbidity = log(target(1,:)+1);
turbidity = target(1,:);
mainComp = 15;
s = load('eigenVector.mat','s');
s = s.s;
v = load('singularValue.mat','v');
v = v.v;
a = s'*input;
b = inv(v(1:mainComp,1:mainComp))*a(1:mainComp,:);
X = [b;log(turbidity+1)];
mdl = fitrsvm(X',Y,'Standardize',true,'KernelFunction','polynomial','KernelScale','auto','OutlierFraction',0.05);
save mySVMMDL mdl;
yfit = exp(predict(mdl,X'))-1;

답변 (1개)

Jo
Jo 2023년 10월 26일
Hello,
I know this post is old but maybe my answer can help someone that may have the same question ?
The data stored in "mdl.SupportVectors" are preprocessed data. As you have set the option 'standardized','true', these data are standardized. So you need to standardized manually "Mdl.X" to be able to compare both matrices.

카테고리

Help CenterFile Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by