使用fitrsvm时出错,Y必须是浮点数的向量

时间:2019-05-28 10:32:30

标签: matlab machine-learning svm

对于以下代码,我收到此错误:

Error using RegressionSVM.prepareData (line 555)
Y must be a vector of floating-point numbers.

Error in classreg.learning.FitTemplate/fit (line 213)
                this.PrepareData(X,Y,this.BaseFitObjectArgs{:});

Error in RegressionSVM.fit (line 350)
        this = fit(temp,X,Y);

Error in fitrsvm (line 271)
obj = RegressionSVM.fit(X,Y,RemainingArgs{:});

有人可以帮忙吗?

TrainIn  = xlsread('DATA.csv','DATA','A2:K108');    
TrainOut = xlsread('DATA.csv','DATA','L2:O108');    

Mdl = fitrsvm(TrainIn,TrainOut,'KernelFunction','polynomial','KernelScale','auto','Standardize',true);

0 个答案:

没有答案