Predicting Next Value using fitrsvm and predict giving the constant output

2 Ansichten (letzte 30 Tage)
Hello. I have trained a regression model using fitrsvm, then I use the predict function on my test data. The model performs really well. But, When I tried using "predict", it gives the same output array. Actually, I'm trying to predict the value of yts from 501 until 507 and compare the output with the real value. Please Help me.
%Data Train and Data Test
xtr = [nomor(1:500)];
ytr = [y(1:500)'];
xts = [nomor(501:507)];
yts = [y(501:507)']
mdl2 = fitrsvm(xtr,ytr,'KernelFunction','gaussian','epsilon',0.1,'Solver','ISDA');
conv = mdl2.ConvergenceInfo.Converged;
iter = mdl2.NumIterations;
yfit = predict(mdl2,xts)
% % % % % % These are the outputs % % % % % %
yfit =
1.0e+03 *
7.7353
7.6361
7.6312
7.6312
7.6312
7.6312
7.6312

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by