Compute the polynomial kernel between X and Y.
K(X, Y) = (gamma <X, Y> + coef0) ^ degree
Read more in the User Guide.
A feature array.
An optional second feature array. If None
, uses Y=X
.
Kernel degree.
Coefficient of the vector inner product. If None, defaults to 1.0 / n_features.
Constant offset added to scaled inner product.
The polynomial kernel.
Examples
>>> from sklearn.metrics.pairwise import polynomial_kernel >>> X = [[0, 0, 0], [1, 1, 1]] >>> Y = [[1, 0, 0], [1, 1, 0]] >>> polynomial_kernel(X, Y, degree=2) array([[1. , 1. ], [1.77, 2.77]])
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4