Package smile.math.kernel
Interface IsotropicKernel
- All Superinterfaces:
Function,Serializable
- All Known Implementing Classes:
BinarySparseGaussianKernel,BinarySparseLaplacianKernel,BinarySparseMaternKernel,BinarySparseThinPlateSplineKernel,Gaussian,GaussianKernel,Laplacian,LaplacianKernel,Matern,MaternKernel,SparseGaussianKernel,SparseLaplacianKernel,SparseMaternKernel,SparseThinPlateSplineKernel,ThinPlateSpline,ThinPlateSplineKernel
Isotropic kernel. If the kernel is a function only of the distance
|x − y|, it is called isotropic. It is thus invariant
to all rigid motions.-
Method Summary
Modifier and TypeMethodDescriptiondefault doubleapply(double dist) Computes the kernel function.default doublef(double dist) Computes the value of the function at x.doublek(double dist) Computes the isotropic kernel function.default MatrixComputes the kernel matrix.double[]kg(double dist) Computes the isotropic kernel function and its gradient over hyperparameters.default Matrix[]Computes the kernel and gradient matrices.
-
Method Details
-
f
default double f(double dist) Description copied from interface:FunctionComputes the value of the function at x. -
k
double k(double dist) Computes the isotropic kernel function.- Parameters:
dist- The distance.- Returns:
- the kernel value.
-
kg
double[] kg(double dist) Computes the isotropic kernel function and its gradient over hyperparameters.- Parameters:
dist- The distance.- Returns:
- the kernel value and gradient.
-
apply
default double apply(double dist) Computes the kernel function. This is simply for Scala convenience. -
K
Computes the kernel matrix.- Parameters:
pdist- The pairwise distance matrix.- Returns:
- The kernel matrix.
-
KG
Computes the kernel and gradient matrices.- Parameters:
pdist- The pairwise distance matrix.- Returns:
- the kernel and gradient matrices.
-