Class AdaGrad

  • All Implemented Interfaces:
    Configurable, Serializable, CapabilitiesHandler, Classifier, MultiClassClassifier, Regressor, AWTRenderable, Learner<Example<Instance>>, MOAObject, OptionHandler

    public class AdaGrad
    extends SGD
    Implements the AdaGrad oneline optimiser for learning various linear models (binary class SVM, binary class logistic regression and linear regression). For more information, see

    Duchi, J., Hazan, E., & Singer, Y. (2011). Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12 (Jul), 2121-2159.

    * BibTeX:

     @inproceedings{duchi2011,
        author = {Duchi, John and Hazan, Elad and Singer, Yoram},
        booktitle = {Journal of Machine Learning Research},
        pages = {2121--2159},
        volume={12},
        number={Jul},
        title = {Adaptive subgradient methods for online learning and stochastic optimization},
        year = {2011}
     }
     

    See Also:
    Serialized Form
    • Field Detail

      • m_epsilon

        protected double m_epsilon
        The epsilon value
      • m_velocity

        protected DoubleVector m_velocity
        Stores the weights (+ bias in the last element)
      • m_biasVelocity

        protected double m_biasVelocity
    • Constructor Detail

      • AdaGrad

        public AdaGrad()
    • Method Detail

      • setEpsilon

        public void setEpsilon​(double eps)
        Set the epsilon value.
        Parameters:
        eps - the epsilon value to use.
      • getEpsilon

        public double getEpsilon()
        Get the epsilon value.
        Returns:
        the epsilon value
      • resetLearningImpl

        public void resetLearningImpl()
        Description copied from class: AbstractClassifier
        Resets this classifier. It must be similar to starting a new classifier from scratch.

        The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.
        Overrides:
        resetLearningImpl in class SGD
      • trainOnInstanceImpl

        public void trainOnInstanceImpl​(Instance instance)
        Trains the classifier with the given instance.
        Overrides:
        trainOnInstanceImpl in class SGD
        Parameters:
        instance - the new training instance to include in the model