Class ProductKernel<T>
java.lang.Object
smile.math.kernel.ProductKernel<T>
- Type Parameters:
T- the input type of kernel function.
- All Implemented Interfaces:
Serializable, ToDoubleBiFunction<T,T>, MercerKernel<T>
The product kernel takes two kernels and combines them via k1(x, y) * k2(x, y).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]hi()Returns the upper bound of hyperparameters (in hyperparameter tuning).double[]Returns the hyperparameters of kernel.doubleKernel function.double[]Computes the kernel and its gradient over hyperparameters.double[]lo()Returns the lower bound of hyperparameters (in hyperparameter tuning).of(double[] params) Returns the same kind kernel with the new hyperparameters.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MercerKernel
apply, applyAsDouble, K, K, KG
-
Constructor Details
-
ProductKernel
Constructor.- Parameters:
k1- the kernel to combine.k2- the kernel to combine.
-
-
Method Details
-
k
Description copied from interface:MercerKernelKernel function.- Specified by:
kin interfaceMercerKernel<T>- Parameters:
x- an object.y- an object.- Returns:
- the kernel value.
-
kg
Description copied from interface:MercerKernelComputes the kernel and its gradient over hyperparameters.- Specified by:
kgin interfaceMercerKernel<T>- Parameters:
x- an object.y- an object.- Returns:
- the kernel value and gradient.
-
of
Description copied from interface:MercerKernelReturns the same kind kernel with the new hyperparameters.- Specified by:
ofin interfaceMercerKernel<T>- Parameters:
params- the hyperparameters.- Returns:
- the same kind kernel with the new hyperparameters.
-
hyperparameters
public double[] hyperparameters()Description copied from interface:MercerKernelReturns the hyperparameters of kernel.- Specified by:
hyperparametersin interfaceMercerKernel<T>- Returns:
- the hyperparameters of kernel.
-
lo
public double[] lo()Description copied from interface:MercerKernelReturns the lower bound of hyperparameters (in hyperparameter tuning).- Specified by:
loin interfaceMercerKernel<T>- Returns:
- the lower bound of hyperparameters.
-
hi
public double[] hi()Description copied from interface:MercerKernelReturns the upper bound of hyperparameters (in hyperparameter tuning).- Specified by:
hiin interfaceMercerKernel<T>- Returns:
- the upper bound of hyperparameters.
-