smile.math.kernel
Class BinarySparseGaussianKernel
- java.lang.Object
-
- smile.math.kernel.BinarySparseGaussianKernel
-
- All Implemented Interfaces:
- java.io.Serializable, MercerKernel<int[]>
public class BinarySparseGaussianKernel extends java.lang.Object implements MercerKernel<int[]>, java.io.Serializable
The Gaussian Mercer Kernel. k(u, v) = e-||u-v||2 / (2 * σ2), where σ > 0 is the scale parameter of the kernel. The kernel works on sparse binary array as int[], which are the indices of nonzero elements.The Gaussian kernel is a good choice for a great deal of applications, although sometimes it is remarked as being overused.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BinarySparseGaussianKernel(double sigma)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublek(int[] x, int[] y)Kernel function.java.lang.StringtoString()
-
-
-
Constructor Detail
-
BinarySparseGaussianKernel
public BinarySparseGaussianKernel(double sigma)
Constructor.- Parameters:
sigma- the smooth/width parameter of Gaussian kernel.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
k
public double k(int[] x, int[] y)Description copied from interface:MercerKernelKernel function.- Specified by:
kin interfaceMercerKernel<int[]>
-
-
DataMelt 3.0 © DataMelt by jWork.ORG