Documentation of 'jsat.classifiers.svm.extended.OnlineAMM' Java class
OnlineAMM
jsat.classifiers.svm.extended

Class OnlineAMM

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Classifier, UpdateableClassifier, Parameterized
    Direct Known Subclasses:
    AMM


    public class OnlineAMM
    extends BaseUpdateableClassifier
    implements Parameterized
    This is the Online variant of the Adaptive Multi-Hyperplane Machine (AMM) algorithm. It is related to linear SVMs where instead of having only a single weight vector, it is extended to multi-class problems by giving each class its own weight vector. It is further extended by allowing each class to dynamically add new weight vectors to increase the non-linearity of the solution.
    This algorithm works best for problems with a very large number of data points where traditional kernelized SVMs are prohibitively expensive to train due to computational cost.

    Unlike the batch variant, the online AMM algorithm has no convergence guarantees. However it still produces good results.
    See:
    • Wang, Z., Djuric, N., Crammer, K., & Vucetic, S. (2011). Trading representability for scalability Adaptive Multi-Hyperplane Machine for nonlinear Classification. In Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining - KDD ’11 (p. 24). New York, New York, USA: ACM Press. doi:10.1145/2020408.2020420
    • Djuric, N., Lan, L., Vucetic, S., & Wang, Z. (2014). BudgetedSVM: A Toolbox for Scalable SVM Approximations. Journal of Machine Learning Research, 14, 3813–3817. Retrieved from here
    See Also:
    Serialized Form
    • Constructor Detail

      • OnlineAMM

        public OnlineAMM()
        Creates a new online AMM learner
      • OnlineAMM

        public OnlineAMM(double lambda)
        Creates a new online AMM learner
        Parameters:
        lambda - the regularization value to use
      • OnlineAMM

        public OnlineAMM(double lambda,
                         int classBudget)
        Creates a new online AMM learner
        Parameters:
        lambda - the regularization value to use
        classBudget - the maximum number of weight vectors for each class
      • OnlineAMM

        public OnlineAMM(OnlineAMM toCopy)
        Copy constructor
        Parameters:
        toCopy - the object to copy
    • Method Detail

      • setLambda

        public void setLambda(double lambda)
        Sets the regularization parameter for this algorithm. The original paper suggests trying values 10-2, 10-3, ..., 10-6, 10-7.
        Parameters:
        lambda - the positive regularization parameter in (0, ∞)
      • getLambda

        public double getLambda()
        Returns the regularization parameter
        Returns:
        the regularization parameter
      • setPruneFrequency

        public void setPruneFrequency(int frequency)
        Sets the frequency at which the weight vectors are pruned. Increasing the frequency increases the aggressiveness of pruning.
        Parameters:
        frequency - the number of iterations between each pruning
      • getPruneFrequency

        public int getPruneFrequency()
        Returns the number of iterations between each pruning
        Returns:
        the number of iterations between each pruning
      • setC

        public void setC(double c)
        Sets the pruning constant which controls how powerful pruning is when pruning occurs. Increasing C increases how many weights will be pruned. Changes to the scaling of feature vectors may require a change in the value of C
        NOTE: This parameter is not the same as the standard C parameter associated with SVMs.
        Parameters:
        c - the positive pruning constant to use in (0, ∞)
      • getC

        public double getC()
        Returns the pruning constant
        Returns:
        the pruning constant
      • setClassBudget

        public void setClassBudget(int classBudget)
        When given bad parameters there is the possibility for unbounded growth in the number of hyperplanes used. By setting this value to a reasonable upperbound catastrophic memory and CPU use can be avoided.
        Parameters:
        classBudget - the maximum number of hyperplanes allowed per class
      • getClassBudget

        public int getClassBudget()
        Returns the maximum number of hyperplanes allowed per class
        Returns:
        the maximum number of hyperplanes allowed per class
      • update

        public void update(DataPoint dataPoint,
                           int y_t)
        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
        y_t - 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
      • guessLambda

        public static Distribution guessLambda(DataSet d)
        Guess the distribution to use for the regularization term λ in AMM.
        Parameters:
        d - the data set to get the guess for
        Returns:
        the guess for the λ parameter

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.