Radial basis function kernel: Difference between revisions

Content deleted Content added
LordBm (talk | contribs)
m Use proper norm symbol ||
Line 3:
The RBF kernel on two samples '''x''' and '''x'''', represented as feature vectors in some ''input space'', is defined as<ref name="primer">Jean-Philippe Vert, Koji Tsuda, and Bernhard Schölkopf (2004). [http://cbio.ensmp.fr/~jvert/publi/04kmcbbook/kernelprimer.pdf "A primer on kernel methods".] ''Kernel Methods in Computational Biology''.</ref>
 
:<math>K(\mathbf{x}, \mathbf{x'}) = \exp\left(-\frac{|\|\mathbf{x} - \mathbf{x'}|\|^2}{2\sigma^2}\right)</math>
 
<math>\textstyle|\|\mathbf{x} - \mathbf{x'}|\|^2</math> may be recognized as the [[Euclidean distance#Squared Euclidean distance|squared Euclidean distance]] between the two feature vectors. <math>\sigma</math> is a free parameter. An equivalent, but simpler, definition involves a parameter <math>\textstyle\gamma = \tfrac{1}{2\sigma^2}</math>:
 
:<math>K(\mathbf{x}, \mathbf{x'}) = \exp(-\gamma|\|\mathbf{x} - \mathbf{x'}|\|^2)</math>
 
Since the value of the RBF kernel decreases with distance and ranges between zero (in the limit) and one (when {{math|'''x''' {{=}} '''x''''}}), it has a ready interpretation as a [[similarity measure]].<ref name="primer"/>
Line 21:
:<math>
\begin{alignat}{2}
\exp\left(-\frac{1}{2}|\|\mathbf{x} - \mathbf{x'}|\|^2\right)
&= \sum_{j=0}^\infty \frac{(\mathbf{x}^\top \mathbf{x'})^j}{j!} \exp\left(-\frac{1}{2}|\|\mathbf{x}|\|^2\right) \exp\left(-\frac{1}{2}|\|\mathbf{x'}|\|^2\right)\\
&= \sum_{j=0}^\infty \sum_{\sum n_i=j}
\exp\left(-\frac{1}{2}|\|\mathbf{x}|\|^2\right)
\frac{x_1^{n_1}\cdots x_k^{n_k} }{\sqrt{n_1! \cdots n_k! }}
\exp\left(-\frac{1}{2}|\|\mathbf{x'}|\|^2\right)
\frac{{x'}_1^{n_1}\cdots {x'}_k^{n_k} }{\sqrt{n_1! \cdots n_k! }}
\end{alignat}