In the Support Vector Regression, where can i see or identify the solved function?
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Darshan Ramakant Bhat
2017-3-6
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
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!