GaussianKernel#

class datafold.pcfold.GaussianKernel(epsilon=1.0, distance=None)[source]#

Bases: RadialBasisKernel

Gaussian radial basis kernel.

K = \exp(\frac{-1}{2\varepsilon} \cdot D)

where D is the squared euclidean distance matrix.

See also super classes RadialBasisKernel and PCManifoldKernel for more functionality and documentation.

Parameters:

epsilon (Union[float, Callable]) – The kernel scale as a positive float value. Alternatively, a callable can be passed to which the distance matrix is (i.e. function(distance_matrix)). The return value of this function must be a positive float that is used as the epsilon.

Methods Summary

evaluate(distance_matrix)

Evaluate the kernel on pre-computed distance matrix.

Methods Documentation

evaluate(distance_matrix)[source]#

Evaluate the kernel on pre-computed distance matrix.

Parameters:

distance_matrix (Union[ndarray, csr_matrix]) – Matrix of pairwise distances of shape (n_samples_Y, n_samples_X).

Returns:

Kernel matrix of same shape and type as distance_matrix.

Return type:

Union[np.ndarray, scipy.sparse.csr_matrix]