Package smile.math.kernel
Interface DotProductKernel
- All Superinterfaces:
Function
,Serializable
- All Known Implementing Classes:
BinarySparseHyperbolicTangentKernel
,BinarySparseLinearKernel
,BinarySparsePolynomialKernel
,HyperbolicTangent
,HyperbolicTangentKernel
,LinearKernel
,Polynomial
,PolynomialKernel
,SparseHyperbolicTangentKernel
,SparseLinearKernel
,SparsePolynomialKernel
Dot product kernel depends only on the dot product of x and y.
-
Method Summary
Modifier and TypeMethodDescriptiondefault double
apply
(double dot) Computes the kernel function.default double
f
(double dot) Computes the value of the function at x.double
k
(double dot) Computes the dot product kernel function.default Matrix
Computes the kernel matrix.double[]
kg
(double dot) Computes the dot product kernel function and its gradient over hyperparameters.
-
Method Details
-
f
default double f(double dot) Description copied from interface:Function
Computes the value of the function at x. -
k
double k(double dot) Computes the dot product kernel function.- Parameters:
dot
- the dot product.- Returns:
- the kernel value.
-
kg
double[] kg(double dot) Computes the dot product kernel function and its gradient over hyperparameters.- Parameters:
dot
- The dot product.- Returns:
- the kernel value and gradient.
-
apply
default double apply(double dot) Computes the kernel function. This is simply for Scala convenience. -
K
Computes the kernel matrix.- Parameters:
pdot
- the pairwise dot product matrix.- Returns:
- the kernel matrix.
-