polylearn.kernels.
homogeneous_kernel
(X, P, degree=2)[source]¶Convenience alias for homogeneous polynomial kernel between X and P:
K_P(x, p) = <x, p> ^ degree
Parameters: | X : ndarray of shape (n_samples_1, n_features) Y : ndarray of shape (n_samples_2, n_features) degree : int, default 2 |
---|---|
Returns: | Gram matrix : array of shape (n_samples_1, n_samples_2) |