Class PearsonKernel
java.lang.Object
smile.math.kernel.PearsonKernel
- All Implemented Interfaces:
Serializable, ToDoubleBiFunction<double[],double[]>, MercerKernel<double[]>
Pearson VII universal kernel. The Pearson VII function
is often used for curve fitting of X-ray diffraction
scans and single bands in infrared spectra.
References
- B. Üstün, W.J. Melssen, and L. Buydens. Facilitating the Application of Support Vector Regression by Using a Universal Pearson VII Function Based Kernel, 2006.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPearsonKernel(double sigma, double omega) Constructor.PearsonKernel(double sigma, double omega, double lo, double hi) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]hi()Returns the upper bound of hyperparameters (in hyperparameter tuning).double[]Returns the hyperparameters of kernel.doublek(double[] x, double[] y) Kernel function.double[]kg(double[] x, double[] y) 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.doubleomega()Returns the tailing factor of the peak.doublesigma()Returns Pearson width.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface MercerKernel
apply, applyAsDouble, K, K, KG
-
Constructor Details
-
PearsonKernel
public PearsonKernel(double sigma, double omega) Constructor.- Parameters:
sigma- Pearson width.omega- The tailing factor of the peak.
-
PearsonKernel
public PearsonKernel(double sigma, double omega, double lo, double hi) Constructor.- Parameters:
sigma- Pearson width.omega- The tailing factor of the peak. The tailing factor is fixed during hyperparameter tuning.lo- The lower bound of length scale for hyperparameter tuning.hi- The upper bound of length scale for hyperparameter tuning.
-
-
Method Details
-
sigma
public double sigma()Returns Pearson width.- Returns:
- Pearson width.
-
omega
public double omega()Returns the tailing factor of the peak.- Returns:
- the tailing factor of the peak.
-
toString
-
k
public double k(double[] x, double[] y) Description copied from interface:MercerKernelKernel function.- Specified by:
kin interfaceMercerKernel<double[]>- Parameters:
x- an object.y- an object.- Returns:
- the kernel value.
-
kg
public double[] kg(double[] x, double[] y) Description copied from interface:MercerKernelComputes the kernel and its gradient over hyperparameters.- Specified by:
kgin interfaceMercerKernel<double[]>- 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<double[]>- 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<double[]>- 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<double[]>- 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<double[]>- Returns:
- the upper bound of hyperparameters.
-