smile.math.kernel

## Interface MercerKernel<T>

• ### Method Summary

All Methods
Modifier and Type Method and Description
`default double` ```apply(T x, T y)```
Kernel function.
`default double` ```applyAsDouble(T x, T y)```
`double[]` `hi()`
Returns the upper bound of hyperparameters.
`double[]` `hyperparameters()`
Returns the hyperparameters for tuning.
`default Matrix` `K(T[] x)`
Computes the kernel matrix.
`default Matrix` ```K(T[] x, T[] y)```
Returns the kernel matrix.
`double` ```k(T x, T y)```
Kernel function.
`default Matrix[]` `KG(T[] x)`
Computes the kernel and gradient matrices.
`double[]` ```kg(T x, T y)```
Computes the kernel and its gradient over hyperparameters.
`double[]` `lo()`
Returns the lower bound of hyperparameters.
`MercerKernel<T>` `of(double[] params)`
Returns the same kind kernel with the new hyperparameters.
• ### Method Detail

• #### k

```double k(T x,
T y)```
Kernel function.
• #### kg

```double[] kg(T x,
T y)```
Computes the kernel and its gradient over hyperparameters.
• #### apply

```default double apply(T x,
T y)```
Kernel function. This is simply for Scala convenience.
• #### applyAsDouble

```default double applyAsDouble(T x,
T y)```
Specified by:
`applyAsDouble` in interface `java.util.function.ToDoubleBiFunction<T,T>`
• #### KG

`default Matrix[] KG(T[] x)`
Computes the kernel and gradient matrices.
Parameters:
`x` - samples.
Returns:
• #### K

`default Matrix K(T[] x)`
Computes the kernel matrix.
Parameters:
`x` - samples.
Returns:
the kernel matrix.
• #### K

```default Matrix K(T[] x,
T[] y)```
Returns the kernel matrix.
Parameters:
`x` - samples.
`y` - samples.
Returns:
the kernel matrix.
• #### of

`MercerKernel<T> of(double[] params)`
Returns the same kind kernel with the new hyperparameters.
• #### hyperparameters

`double[] hyperparameters()`
Returns the hyperparameters for tuning.
• #### lo

`double[] lo()`
Returns the lower bound of hyperparameters.
• #### hi

`double[] hi()`
Returns the upper bound of hyperparameters.