checkgrad(self,
verbose=0,
step=1e-06,
tolerance=0.001,
df_tolerance=1e-12)
| source code
|
Check the gradient of this parameter with respect to the highest
parent's objective function. This is a three point estimate of the
gradient, wiggling at the parameters with a stepsize step. The check
passes if either the ratio or the difference between numerical and
analytical gradient is smaller then tolerance.
:param bool verbose: whether each parameter shall be checked
individually. :param float step: the stepsize for the numerical three
point gradient estimate. :param float tolerance: the tolerance for the
gradient ratio or difference. :param float df_tolerance: the tolerance
for df_tolerance
.. note:
The *dF_ratio* indicates the limit of accuracy of numerical gradients.
If it is too small, e.g., smaller than 1e-12, the numerical gradients
are usually not accurate enough for the tests (shown with blue).
|