Class Laplacian
java.lang.Object
smile.math.kernel.Laplacian
- All Implemented Interfaces:
 Serializable, IsotropicKernel, Function
- Direct Known Subclasses:
 BinarySparseLaplacianKernel, LaplacianKernel, SparseLaplacianKernel
Laplacian kernel, also referred as exponential kernel.
k(u, v) = exp(-||u-v|| / σ)
where σ > 0 is the scale parameter of the kernel.
- See Also:
 
- 
Constructor Details
- 
Laplacian
public Laplacian(double sigma, double lo, double hi) Constructor.- Parameters:
 sigma- The length scale of kernel.lo- The lower bound of length scale for hyperparameter tuning.hi- The upper bound of length scale for hyperparameter tuning.
 
 - 
 - 
Method Details
- 
scale
public double scale()Returns the length scale of kernel.- Returns:
 - the length scale of kernel.
 
 - 
toString
 - 
k
public double k(double dist) Description copied from interface:IsotropicKernelComputes the isotropic kernel function.- Specified by:
 kin interfaceIsotropicKernel- Parameters:
 dist- The distance.- Returns:
 - the kernel value.
 
 - 
kg
public double[] kg(double dist) Description copied from interface:IsotropicKernelComputes the isotropic kernel function and its gradient over hyperparameters.- Specified by:
 kgin interfaceIsotropicKernel- Parameters:
 dist- The distance.- Returns:
 - the kernel value and gradient.
 
 
 -