SVM KernelFunction and KernelScale. What is the difference?

33 ビュー (過去 30 日間)
Dylan den Hartog
Dylan den Hartog 2021 年 1 月 27 日
回答済み: Pratyush Roy 2021 年 2 月 5 日
When using Support Vector Machines in the Classification Learner, what is the diffence between the KernelFunction (gaussian, linear, quadratic or cubic) and the KernelScale (which could be any number)?
Is a SVM with a linear KernelFunction and Kernelscale of 2 the same as a SVM wth a quadratic KernelFunction and a KernelScale of 1?
Thanks in advance.

回答 (1 件)

Pratyush Roy
Pratyush Roy 2021 年 2 月 5 日
Hi Dylan,
The KernelScale is a scaling parameter which is used to scale the data before evaluation of the appropriate Gram matrix.
  • In case one specifies the parameter to be 'auto', the software selects an appropriate scale factor using a heuristic procedure. This heuristic procedure uses subsampling, so estimates can vary from one call to another. Therefore, to reproduce results, set a random number seed using rng before training.
  • If one specifies KernelScale and a custom kernel function, for example, 'KernelFunction', 'kernel', then the software throws an error. Then scaling must be applied within kernel.
The KernelFunction is the function used to compute the elements of Gram Matrix G after scaling has been applied using the KernelScale parameter.
The linear kernel function can be defined as:
Scaling the predictor variables by a factor of, say, s gives us the Gram matrix
This is not same as a quadratic kernel function with scaling factor 1 with the following form:
You can refer to this link for further information.
Hope this helps!

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by