Class ThinPlateSpline

java.lang.Object
smile.math.kernel.ThinPlateSpline
All Implemented Interfaces:
Serializable, Function, IsotropicKernel
Direct Known Subclasses:
BinarySparseThinPlateSplineKernel, SparseThinPlateSplineKernel, ThinPlateSplineKernel

public class ThinPlateSpline extends Object implements IsotropicKernel
The Thin Plate Spline kernel.

k(u, v) = (||u-v|| / σ)2 log (||u-v|| / σ)

where σ > 0 is the scale parameter of the kernel.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    ThinPlateSpline(double sigma, double lo, double hi)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    k(double dist)
    Computes the isotropic kernel function.
    double[]
    kg(double dist)
    Computes the isotropic kernel function and its gradient over hyperparameters..
    double
    Returns the length scale of kernel.
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface smile.math.Function

    inv

    Methods inherited from interface smile.math.kernel.IsotropicKernel

    apply, f, K, KG
  • Constructor Details

    • ThinPlateSpline

      public ThinPlateSpline(double sigma, double lo, double hi)
      Constructor.
      Parameters:
      sigma - The length scale of kernel.
      lo - The lower bound of length scale for hyperparameter tuning.
      hi - The upper bound of length scale for hyperparameter tuning.
  • Method Details

    • scale

      public double scale()
      Returns the length scale of kernel.
      Returns:
      the length scale of kernel.
    • toString

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

      public double k(double dist)
      Description copied from interface: IsotropicKernel
      Computes the isotropic kernel function.
      Specified by:
      k in interface IsotropicKernel
      Parameters:
      dist - The distance.
      Returns:
      the kernel value.
    • kg

      public double[] kg(double dist)
      Description copied from interface: IsotropicKernel
      Computes the isotropic kernel function and its gradient over hyperparameters..
      Specified by:
      kg in interface IsotropicKernel
      Parameters:
      dist - The distance.
      Returns:
      the kernel value and gradient.