Finding SVM hyperplane equation for 2nd order polynomial

12 ビュー (過去 30 日間)
Jose Luis Villaescusa Nadal
Jose Luis Villaescusa Nadal 2021 年 1 月 10 日
Hello, I was using the Support Vector Machine model calculation for a 2nd order hyperplane to separate two classes:
SVMmodel = fitcsvm(predictors,response, ...
'KernelFunction', 'polynomial', ...
'PolynomialOrder', 2, ...
'KernelScale', kernelscale, ...
'BoxConstraint', boxconstraint, ...
'Standardize', true, ...
'ClassNames',[1; 2]);
But the resulting function has the Beta parameters (that indicate the hyperplane equation) completely empty.
How can I find the equation then for the 2nd order hyperplane, or have the function provide me with the beta values?
Is this a bug?
This is what the resulting struct looks like:
Thanks a lot.

採用された回答

Aditya Patil
Aditya Patil 2021 年 2 月 4 日
In SVM, the beta value is used to find score only in case of linear kernel, as either no feature transformation or explicit feature transformation is done. However in case of other kernels, the feature transformation is implicit(using the “kernel trick”), hence the beta value is never calculated.
This is further elaborated in the following equations. For the linear kernel, , where is bias. While for other kernels, , where G is gram matrix. As this equation is not in terms of x, you can't get the score function in terms of x.
The predict function optionally provides scores. This can be used to plot the decision boundary. You can check the support vector machines for binary classification documentation for an example. As the score is distance of the point from the decision boundary, finding where the score is zero gives the decision boundary.
  1 件のコメント
Jose Luis Villaescusa Nadal
Jose Luis Villaescusa Nadal 2021 年 2 月 6 日
Thanks a lot, I finally understand :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResampling Techniques についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by