Check for missing argument or incorrect argument data type in call to function 'predict'.
显示 更早的评论
I created my model in two different ways first using fitlm and then fitrlinear. With fitlm everything is okay, but with fitrlinear, when in the last row I use predict(mdl2,Xte), it returns me the error.
I checked all the related documentation but I don' understand why it is wrong.
% Xtr,Ytr = training | Xte,Yte = testing
mdl1 = fitlm(Xtr,Ytr);
mdl2 = fitrlinear(Xtr,Ytr,'KFold',5,'Learner','leastsquares','Regularization','lasso');
ypred1 = predict(mdl1,Xte);
ypred2 = predict(mdl2,Xte);
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Support Vector Machine Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!