Predicting Next Value using fitrsvm and predict giving the constant output

조회 수: 2 (최근 30일)
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

답변 (0개)

카테고리

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