Polynomial kernel¶
The Polynomial kernel is a popular kernel function used in kernelized learning algorithms. It represents the similarity of training samples in a feature space of polynomials of the original data and allows to fit non-linear models.
Operation |
Computational methods |
Programming Interface |
||
Mathematical formulation¶
Computing¶
Given a set \(X\) of \(n\) feature vectors \(x_1 = (x_{11}, \ldots, x_{1p}), \ldots, x_n = (x_{n1}, \ldots, x_{np})\) of dimension \(p\) and a set \(Y\) of \(m\) feature vectors \(y_1 = (y_{11}, \ldots, y_{1p}), \ldots, y_m = (y_{m1}, \ldots, y_{mp})\), the problem is to compute the polynomial kernel function \(K(x_i, y_j)\) for any pair of input vectors:
where \(k\in\mathbb{R},\ b\in\mathbb{R},\ d\in{\{0,\ 1,\ 2,\ ...\}}, \quad 1 \leq i \leq n, \quad 1 \leq j \leq m\).
Computation method: dense¶
The method computes the polynomial kernel function \(Z=K(X, Y), Z \in \mathbb{R}^{n \times m}\) for dense \(X\) and \(Y\) matrices.
Programming Interface¶
Refer to API Reference: Polynomial kernel.