Documentation of 'jsat.regression.KernelRLS' Java class
KernelRLS
jsat.regression

Class KernelRLS

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Parameterized, Regressor, UpdateableRegressor


    public class KernelRLS
    extends java.lang.Object
    implements UpdateableRegressor, Parameterized
    Provides an implementation of the Kernel Recursive Least Squares algorithm. This algorithm updates the model one per data point, and induces sparsity by projecting data points down onto a set of basis vectors learned from the data stream.

    See: Engel, Y., Mannor, S.,&Meir, R. (2004). The Kernel Recursive Least-Squares Algorithm. IEEE Transactions on Signal Processing, 52(8), 2275–2285. doi:10.1109/TSP.2004.830985
    See Also:
    Serialized Form
    • Constructor Detail

      • KernelRLS

        public KernelRLS(KernelTrick k,
                         double errorTolerance)
        Creates a new Kernel RLS learner
        Parameters:
        k - the kernel trick to use
        errorTolerance - the tolerance for errors in the projection
    • Method Detail

      • setErrorTolerance

        public void setErrorTolerance(double v)
        Sets the tolerance for errors in approximating a data point by projecting it onto the set of basis vectors. In general: as the tolerance increases the sparsity of the model increases but the accuracy may go down.
        Values in the range 10x ∀ x ∈ {-1, -2, -3, -4} often work well for this algorithm.
        Parameters:
        v - the approximation tolerance
      • getErrorTolerance

        public double getErrorTolerance()
        Returns the projection approximation tolerance
        Returns:
        the projection approximation tolerance
      • getModelSize

        public int getModelSize()
        Returns the number of basis vectors that make up the model
        Returns:
        the number of basis vectors that make up the model
      • finalizeModel

        public void finalizeModel()
        Finalizes the model. During online training, the the gram matrix and its inverse must be stored to perform updates, at the cost of O(n2) memory. One training is completed, these matrices are no longer needed - and can be removed to reclaim memory by finalizing the model. Once finalized, the model can no longer be updated - unless reset (destroying the model) by calling setUp(jsat.classifiers.CategoricalData[], int)
      • update

        public void update(DataPoint dataPoint,
                           double y_t)
        Description copied from interface: UpdateableRegressor
        Updates the classifier by giving it a new data point to learn from.
        Specified by:
        update in interface UpdateableRegressor
        Parameters:
        dataPoint - the data point to learn
        y_t - the target value of the data point

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.