使用:
sklearn.metrics.pairwise.rbf_kernel(X, Y=None, gamma=None)
介绍:
计算X和Y之间的rbf(高斯)内核:
K(x, y) = exp(-gamma ||x-y||^2)
参数 | 说明 |
---|---|
X | array of shape (n_samples_X, n_features) |
Y | array of shape (n_samples_Y, n_features) |
gamma | float, default None(如果为None,则默认为1.0 / n_features) |
返回值 | 说明 |
kernel_matrix | array of shape (n_samples_X, n_samples_Y) |
详见:
https://scikit-learn.org.cn/view/128.html#6.8.5%20RBF%20%E6%A0%B8