GaussianKernel

class rlscore.kernel.gaussian_kernel.GaussianKernel(X, gamma=1.0)

Bases: object

Gaussian (RBF) kernel.

k(xi,xj) = e^(-gamma*<xi-xj,xi-xj>)

Parameters:
X : {array-like, sparse matrix}, shape = [n_bvectors, n_features]

Basis vectors

gamma : float, optional (default 1.0)

Kernel width

Attributes:
train_X : {array-like, sparse matrix}, shape = [n_bvectors, n_features]

Basis vectors

gamma : float

Kernel width

getKM(X)

Returns the kernel matrix between the basis vectors and X.

Parameters:
X : {array-like, sparse matrix}, shape = [n_samples, n_features]
Returns:
K : array, shape = [n_samples, n_bvectors]

kernel matrix