GradDescent

class GradDescent : public minim::NewMinimiser<GradDescent>

Gradient descent minimisation.

Takes steps in the direction of the negative gradient, scaled by the step size alpha. Converged when the RMS gradient falls below the state’s convergence criterion.

Public Functions

GradDescent &setAlpha(double alpha)

Set the step size alpha.

virtual GradDescent &setMaxIter(int maxIter)

Set the maximum number of iterations.

virtual void init(State &state)

Initialise the minimiser before the first iteration.

virtual void iteration(State &state)

Perform a single minimisation iteration.

virtual bool checkConvergence(const State &state) override

Check whether the minimisation is converged.