|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.matrix.HyperbolicTangentKernel
public class HyperbolicTangentKernel
A HyperbolicTangentKernel provides a kernel based on
the hyperbolic tangent of a dot product with fixed linear scaling.
Hyperbolic tangent kernels are popular as neural network activation
functions.
The hyperbolic tangent kernel function of with parameters
k0 and k1 is defined between two
vectors v1 and v2 of the same
dimensionality by:
wherekernel(v1,v2) = tanh(k1 * v1 * v2 + k0)
v1 * v2 is the usual dot product and
the constant k1 is simply a scalar multiplier.
| Constructor Summary | |
|---|---|
HyperbolicTangentKernel(double k0,
double k1)
Construct a linearly offset hyperbolic tangent kernel with the specified slope and intercept parameters. |
|
| Method Summary | |
|---|---|
double |
proximity(Vector v1,
Vector v2)
Returns the result of applying the hyperbolic tangent kernel function to to the specified vectors. |
String |
toString()
Returns a string-based representation of this kernel function, including the offset and slope parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HyperbolicTangentKernel(double k0,
double k1)
k0 - Intercept parameter.k1 - Slope parameter.
IllegalArgumentException - If either of the parameters
are not finite numbers, or if the k1 parameter is zero.| Method Detail |
|---|
public double proximity(Vector v1,
Vector v2)
proximity in interface KernelFunctionproximity in interface Proximity<Vector>v1 - First vector.v2 - Second vector.
IllegalArgumentException - If the vectors are not of the
same dimensionality.public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||