/** * Retrieves the parameters that are set in this learner. * * @return An object containing all the values of the parameters that control the behavior of * this learning algorithm. **/ public Learner.Parameters getParameters() { Parameters p = new Parameters(super.getParameters()); p.weightVector = weightVector; p.learningRate = learningRate; return p; }
/** * Use this constructor to specify an alternative subclass of {@link SparseWeightVector}. * * @param n The name of the classifier. * @param r The desired learning rate value. **/ public StochasticGradientDescent(String n, double r) { super(n); Parameters p = new Parameters(); p.learningRate = r; setParameters(p); }