Check for missing argument or incorrect argument data type in call to function 'predict'.
Show older comments
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);
Accepted Answer
More Answers (0)
Categories
Find more on Support Vector Machine Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!