Fork me on GitHub

sklearn.metrics.pairwise.polynomial_kernel

sklearn.metrics.pairwise.polynomial_kernel(X, Y=None, degree=3, gamma=None, 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)

Previous
Next