sklearn.metrics.pairwise.sigmoid_kernel¶
sklearn.metrics.pairwise.sigmoid_kernel(X, Y=None, gamma=None, coef0=1)
计算X和Y之间的sigmoid核:
K(X, Y) = tanh(gamma <X, Y> + coef0)
在用户指南中阅读更多内容。
| 参数 | 说明 |
|---|---|
| X | ndarray of shape (n_samples_1, n_features) |
| Y | ndarray of shape (n_samples_2, n_features) |
| gamma | float, default None 如果为None,则默认为1.0 / n_features |
| coef0 | float, default 1 |
| 返回值 | 说明 |
|---|---|
| Gram matrix | array of shape (n_samples_1, n_samples_2) |



