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

Class Forgetron

    • Constructor Detail

      • Forgetron

        public Forgetron(KernelTrick kernel,
                         int budget)
        Creates a new Forgetron
        Parameters:
        kernel - the kernel function to use
        budget - the maximum number of data points to use
    • Method Detail

      • setSelfTurned

        public void setSelfTurned(boolean selfTurned)
        Sets whether or not the self-tuned variant of the Forgetron is used, the default is true
        Parameters:
        selfTurned - true to use the self-tuned variance, false otherwise.
      • isSelfTuned

        public boolean isSelfTuned()
        Returns:
        true if the self-tuned variant is used, false otherwise.
      • setBudget

        public void setBudget(int budget)
        Sets the new budget, which is the maximum number of data points the Forgetron can use to form its decision boundary.
        Parameters:
        budget - the maximum number of data points to use
      • getBudget

        public int getBudget()
        Returns the current budget
        Returns:
        the current budget
      • setKernelTrick

        public void setKernelTrick(KernelTrick K)
        Sets the kernel trick to use
        Parameters:
        K - the kernel trick to use
      • getKernelTrick

        public KernelTrick getKernelTrick()
        Returns the current kernel trick
        Returns:
        the current kernel trick
      • 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.
      • 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
      • 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
      • 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

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.