Class PearsonKernel

java.lang.Object
smile.math.kernel.PearsonKernel
All Implemented Interfaces:
Serializable, ToDoubleBiFunction<double[],double[]>, MercerKernel<double[]>

public class PearsonKernel extends Object implements 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 Link icon

  1. 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 Link icon

    Constructors
    Constructor
    Description
    PearsonKernel(double sigma, double omega)
    Constructor.
    PearsonKernel(double sigma, double omega, double lo, double hi)
    Constructor.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    double[]
    hi()
    Returns the upper bound of hyperparameters (in hyperparameter tuning).
    double[]
    Returns the hyperparameters of kernel.
    double
    k(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.
    double
    Returns the tailing factor of the peak.
    double
    Returns Pearson width.
     

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface smile.math.kernel.MercerKernel Link icon

    apply, applyAsDouble, K, K, KG
  • Constructor Details Link icon

    • PearsonKernel Link icon

      public PearsonKernel(double sigma, double omega)
      Constructor.
      Parameters:
      sigma - Pearson width.
      omega - The tailing factor of the peak.
    • PearsonKernel Link icon

      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 Link icon

    • sigma Link icon

      public double sigma()
      Returns Pearson width.
      Returns:
      Pearson width.
    • omega Link icon

      public double omega()
      Returns the tailing factor of the peak.
      Returns:
      the tailing factor of the peak.
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • k Link icon

      public double k(double[] x, double[] y)
      Description copied from interface: MercerKernel
      Kernel function.
      Specified by:
      k in interface MercerKernel<double[]>
      Parameters:
      x - an object.
      y - an object.
      Returns:
      the kernel value.
    • kg Link icon

      public double[] kg(double[] x, double[] y)
      Description copied from interface: MercerKernel
      Computes the kernel and its gradient over hyperparameters.
      Specified by:
      kg in interface MercerKernel<double[]>
      Parameters:
      x - an object.
      y - an object.
      Returns:
      the kernel value and gradient.
    • of Link icon

      public PearsonKernel of(double[] params)
      Description copied from interface: MercerKernel
      Returns the same kind kernel with the new hyperparameters.
      Specified by:
      of in interface MercerKernel<double[]>
      Parameters:
      params - the hyperparameters.
      Returns:
      the same kind kernel with the new hyperparameters.
    • hyperparameters Link icon

      public double[] hyperparameters()
      Description copied from interface: MercerKernel
      Returns the hyperparameters of kernel.
      Specified by:
      hyperparameters in interface MercerKernel<double[]>
      Returns:
      the hyperparameters of kernel.
    • lo Link icon

      public double[] lo()
      Description copied from interface: MercerKernel
      Returns the lower bound of hyperparameters (in hyperparameter tuning).
      Specified by:
      lo in interface MercerKernel<double[]>
      Returns:
      the lower bound of hyperparameters.
    • hi Link icon

      public double[] hi()
      Description copied from interface: MercerKernel
      Returns the upper bound of hyperparameters (in hyperparameter tuning).
      Specified by:
      hi in interface MercerKernel<double[]>
      Returns:
      the upper bound of hyperparameters.