MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / gradConvgHelper

Method gradConvgHelper

JSAT/src/jsat/math/optimization/LBFGS.java:199–207  ·  view source on GitHub ↗
(Vec grad)

Source from the content-addressed store, hash-verified

197 }
198
199 private double gradConvgHelper(Vec grad)
200 {
201 if(!inftNormCriterion)
202 return grad.pNorm(2);
203 double max = 0;
204 for(IndexValue iv : grad)
205 max = Math.max(max, Math.abs(iv.getValue()));
206 return max;
207 }
208
209 /**
210 * Sets the number of history items to keep that are used to approximate the

Callers 1

optimizeMethod · 0.95

Calls 3

pNormMethod · 0.45
maxMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected