This documentation is for scikit-learn version 0.10Other versions

Citing

If you use the software, please consider citing scikit-learn.

This page

8.16.4.4. sklearn.metrics.pairwise.polynomial_kernel

sklearn.metrics.pairwise.polynomial_kernel(X, Y=None, degree=3, gamma=0, coef0=1)

Compute the polynomial kernel between X and Y:

K(X, Y) = (gamma <X, Y> + coef0)^degree
Parameters :

X : array of shape (n_samples_1, n_features)

Y : array of shape (n_samples_2, n_features)

degree : int

Returns :

Gram matrix : array of shape (n_samples_1, n_samples_2)