8.17.4.5. sklearn.metrics.pairwise.rbf_kernel¶
- sklearn.metrics.pairwise.rbf_kernel(X, Y=None, gamma=0)¶
Compute the rbf (gaussian) kernel between X and Y:
K(X, Y) = exp(-gamma ||X-Y||^2)
Parameters : X : array of shape (n_samples_1, n_features)
Y : array of shape (n_samples_2, n_features)
gamma : float
Returns : Gram matrix : array of shape (n_samples_1, n_samples_2)