Documentation of 'jsat.classifiers.linear.kernelized.Projectron' Java class
Projectron
jsat.classifiers.linear.kernelized

Class Projectron

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, BinaryScoreClassifier, Classifier, UpdateableClassifier, Parameterized


    public class Projectron
    extends BaseUpdateableClassifier
    implements BinaryScoreClassifier, Parameterized
    An implementation of the Projectron and Projectrion++ algorithms. These are a kernelized extensions of the Perceptron that bound the number of support vectors used, with the latter incorporating some similarities from PassiveAggressive.
    Unlike many other bounded kernel learners, the number of support vectors is not specified by the user. This value is controlled by a sparsity parameter setEta(double).

    See:
    • Orabona, F., Keshet, J.,&Caputo, B. (2008). The Projectron: a bounded kernel-based Perceptron. Proceedings of the 25th international conference on Machine learning - ICML ’08 (pp. 720–727). New York, New York, USA: ACM Press. doi:10.1145/1390156.1390247
    • Orabona, F., Keshet, J.,&Caputo, B. (2009). Bounded Kernel-Based Online Learning. The Journal of Machine Learning Research, 10, 2643–2666.
    See Also:
    Serialized Form
    • Constructor Detail

      • Projectron

        public Projectron(KernelTrick k)
        Creates a new Projectron++ learner
        Parameters:
        k - the kernel to use
      • Projectron

        public Projectron(KernelTrick k,
                          double eta)
        Creates a new Projectron++ learner
        Parameters:
        k - the kernel to use
        eta - the sparsity parameter
      • Projectron

        public Projectron(KernelTrick k,
                          double eta,
                          boolean useMarginUpdates)
        Creates a new Projectron learner
        Parameters:
        k - the kernel to use
        eta - the sparsity parameter
        useMarginUpdates - whether or not to perform projection updates on margin errors
    • Method Detail

      • setKernel

        public void setKernel(KernelTrick k)
        Sets the kernel trick to be used
        Parameters:
        k - the kernel trick to be use
      • getKernel

        public KernelTrick getKernel()
        Returns the kernel trick in use
        Returns:
        the kernel trick in use
      • setEta

        public void setEta(double eta)
        Sets the η parameter which controls the sparsity of the Projection solution. Larger values result in greater sparsity, at the potential loss of accuracy. If set to 0 and setUseMarginUpdates(boolean) is false, the Projectron degenerates into the standard kernelized Perceptron.
        Parameters:
        eta - the sparsity parameter in [0, Infinity)
      • getEta

        public double getEta()
        Returns the sparsity parameter value
        Returns:
        the sparsity parameter value
      • setUseMarginUpdates

        public void setUseMarginUpdates(boolean useMarginUpdates)
        Sets whether or not projection updates will be performed for margin errors. If true, this behaves as the Projectrion++ algorithm. If false, the behavior is equal to the standard Projectron.
        Parameters:
        useMarginUpdates - true to perform updates on margin errors
      • isUseMarginUpdates

        public boolean isUseMarginUpdates()
        Returns true if margin errors can cause updates, false if not.
        Returns:
        true if margin errors can cause updates, false if not.
      • update

        public void update(DataPoint dataPoint,
                           int targetClass)
        Description copied from interface: UpdateableClassifier
        Updates the classifier by giving it a new data point to learn from.
        Specified by:
        update in interface UpdateableClassifier
        Parameters:
        dataPoint - the data point to learn
        targetClass - the target class of the data point
      • classify

        public CategoricalResults classify(DataPoint data)
        Description copied from interface: Classifier
        Performs classification on the given data point.
        Specified by:
        classify in interface Classifier
        Parameters:
        data - the data point to classify
        Returns:
        the results of the classification.
      • supportsWeightedData

        public boolean supportsWeightedData()
        Description copied from interface: Classifier
        Indicates whether the model knows how to train using weighted data points. If it does, the model will train assuming the weights. The values returned by this method may change depending on the parameters set for the model.
        Specified by:
        supportsWeightedData in interface Classifier
        Returns:
        true if the model supports weighted data, false otherwise
      • getScore

        public double getScore(DataPoint dp)
        Description copied from interface: BinaryScoreClassifier
        Returns the numeric score for predicting a class of a given data point, where the sign of the value indicates which class the data point is predicted to belong to.
        Specified by:
        getScore in interface BinaryScoreClassifier
        Parameters:
        dp - the data point to predict the class label of
        Returns:
        the score for the given data point

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.