In the Support Vector Regression, where can i see or identify the solved function?
3 views (last 30 days)
Show older comments
I want to plot the solved function, linear or nonlinear, so it would be great if someone can help me out where i can find this. And another question: In SVM Regression, how can i get information about the goodness of the fit, like the R-squared value?
0 Comments
Answers (1)
Darshan Ramakant Bhat
on 6 Mar 2017
According to my understanding you are trying to plot the learned function from the svm regression. You can do this by accessing the parameters of the returned model.You can plot maximum upto 3D. A pseudo code can like follows.
Mdl = fitrsvm(X,Y);
Y_response = (1/(mdl.KernelParameters.Scale))*X*mdl.Beta+mdl.Bias;
plot(X,Y_response) %use appropriate plot function 2-D or 3-D
To get the regression value you can use the loss() function. I think following documentation would help you
Regards
Darshan Bhat
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!