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.3. sklearn.metrics.pairwise.linear_kernel

sklearn.metrics.pairwise.linear_kernel(X, Y=None)

Compute the linear kernel between X and Y.

Parameters :

X : array of shape (n_samples_1, n_features)

Y : array of shape (n_samples_2, n_features)

Returns :

Gram matrix : array of shape (n_samples_1, n_samples_2)