public class BinarySparseHyperbolicTangentKernel extends java.lang.Object implements MercerKernel<int[]>, java.io.Serializable
The hyperbolic tangent kernel was quite popular for support vector machines due to its origin from neural networks. However, it should be used carefully since the kernel matrix may not be positive semi-definite. Besides, it was reported the hyperbolic tangent kernel is not better than the Gaussian kernel in general.
The kernel works sparse binary array as int[], which are the indices of nonzero elements.
| Constructor and Description |
|---|
BinarySparseHyperbolicTangentKernel()
Constructor with scale 1.0 and offset 0.0.
|
BinarySparseHyperbolicTangentKernel(double scale,
double offset)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
k(int[] x,
int[] y)
Kernel function.
|
java.lang.String |
toString() |
public BinarySparseHyperbolicTangentKernel()
public BinarySparseHyperbolicTangentKernel(double scale,
double offset)
public java.lang.String toString()
toString in class java.lang.Objectpublic double k(int[] x,
int[] y)
MercerKernelk in interface MercerKernel<int[]>