himalaya.kernel_ridge.polynomial_kernel¶
- himalaya.kernel_ridge.polynomial_kernel(X, Y=None, degree=3, gamma=None, coef0=1)[source]¶
Compute the polynomial kernel between X and Y:
K(X, Y) = (gamma <X, Y> + coef0)^degree
- Parameters
- Xarray of shape (n_samples_X, n_features)
Train or test features.
- Yarray of shape (n_samples_Y, n_features)
Train features.
- degreeint, default 3
Degree of the polynomial.
- gammafloat, default None
if None, defaults to 1.0 / n_features
- coef0float, default 1
Intercept.
- Returns
- Karray of shape (n_samples_X, n_samples_Y)
Computed kernel.