gonum/optimize — pull request #12 by vladimir-ch (2014-11-26 08:27:25+00:00)
Title: Modify Stats.GradientNorm and the gradient convergence check

Remove division by sqrt(dim) in the computation of Stats.GradientNorm because:
* The name of the field is misleading otherwise
* Stats.GradientNorm is reported by Printer which then also becomes misleading
* The division is unnecessary; dimension of the problem is readily available if someone needs the divided value
* Using such modified gradient norm seems non-standard in gradient convergence checks

Add GradientNormInf to Stats

Use the maximum norm of the gradient in the convergence check, it seems more standard than the 2-norm, and modify Printer to show the max-norm instead of the 2-norm.

Point to consider: it would be much more natural to move GradientNorm and GradientNormInf to Location and update it in evaluate().