API class for defining four levels of strategies: low (0), medium (1), high (2), very high (>=3); acts on: Migrad (behavioural), Minos (lowers strategy by 1 for Minos-own minimization), Hesse (iterations), Numerical2PDerivative (iterations)
The strategy level controls the trade-off between the speed and the reliability of the minimization and error calculation. A higher level spends more function evaluations to refine the gradient and the Hessian.
The table below documents every tunable that the strategy governs, together with its default value for each strategy level. Strategy 3 shares strategy 2's Migrad iteration parameters, but skips the expensive full initial Hessian at the seed stage (ComputeInitialHessian) and applies additional changes to the Hesse calculation that aim at a more accurate Hessian and allow returning the covariance matrix without forcing it to be positive-definite.
| Name and effect | Type | Value for strategy n |
| 0 | 1 | 2 | 3 |
| ComputeInitialHessian | bool | false | true | false |
Compute full initial Hessian for the seed state, which can be quite expensive for many parameters.
Usually, the initial approximation that leaves the off-diagonal elements at zero is good enough.
|
| RefineGradientInHessian | bool | false | true |
| After the diagonal second derivatives have been computed, recompute the first derivatives at the current point with the more accurate HessianGradientCalculator (which uses up to HessianGradientNCycles refinement cycles) instead of reusing the gradient from the last minimization step. |
| GradientNCycles | unsigned int | 2 | 3 | 5 |
Maximum number of cycles the numerical gradient calculator spends refining the finite-difference step size and the first-derivative estimate of each parameter. More cycles yield a more accurate gradient at the price of more function evaluations.
A cycle is stopped early once either GradientStepTolerance or GradientTolerance is met.
|
| GradientStepTolerance | double | 0.5 | 0.3 | 0.1 |
Stop the numerical gradient refinement cycle early once the finite-difference step size has stabilized.
The parameter refers to the change in step size relative to the new step size.
This is the partner of the GradientTolerance parameter.
|
| GradientTolerance | double | 0.1 | 0.05 | 0.02 |
Stop the numerical gradient refinement cycle early once the first-derivative estimate itself is stable.
The parameter refers to the change in the first-derivative estimate relative to the new estimate.
This is the partner of the GradientStepTolerance parameter.
|
| HessianCentralFDMixedDerivatives | unsigned int | 0 | 1 |
Central finite difference is used for mixed partial derivatives (the off-diagonal terms of the Hessian).
This requires 3 extra function evaluations per derivative, but is necessary in the case of minima where there is high curvature (in the case of high stats) and the forward finite difference (default) behaviour leads incorrectly to a non-positive-definite covariance matrix.
|
| HessianForcePosDef | unsigned int | 1 | 0 |
Force Hessian / covariance matrix to be positive-definite.
It can be useful to return the uncorrected covariance matrix, even if it is not positive definite.
One use case is to check just how far from positive-definiteness the matrix is by being able to examine the eigenvalues.
|
| HessianG2Tolerance | double | 0.1 | 0.05 | 0.02 | zero |
Stop the Hessian diagonal refinement cycle early if the second derivative estimate itself is stable.
The parameter refers to the change in the second derivative estimate relative to the new estimate.
This is the partner of the HessianStepTolerance parameter.
In some cases, it can help to set it to zero. This was found to be necessary in cases where Asimov datasets were used for the minimization and there were very few iterations for the approximate covariance to be determined from.
|
| HessianGradientNCycles | unsigned int | 1 | 2 | 6 |
Maximum number of refinement cycles used when the first derivatives are recomputed together with the Hessian (see RefineGradientInHessian).
This is the analogue of GradientNCycles, but for the more accurate gradient evaluated during the Hessian calculation.
|
| HessianNCycles | unsigned int | 3 | 5 | 7 |
Maximum number of cycles used to compute each diagonal element of the Hessian (the second derivative with respect to a single parameter). More cycles refine the finite-difference step and give a more accurate second derivative.
A cycle is stopped early once either HessianStepTolerance or HessianG2Tolerance is met.
|
| HessianRecomputeThreshold | double | inf | 0.05 | -inf |
After a Migrad minimization, a full Hesse recomputation of the error matrix is triggered when the relative change of the covariance matrix in the last step (Dcovar) exceeds this threshold.
A value of inf means the Hessian is never recomputed and the approximate covariance accumulated during Migrad is kept, while -inf means it is always recomputed.
|
| HessianStepTolerance | double | 0.5 | 0.3 | 0.1 | zero |
Stop the Hessian diagonal refinement cycle early if the estimated optimal finite-difference step size has stabilized.
The parameter refers to the change in step size relative to the new step size.
This is the partner of the HessianG2Tolerance parameter.
Just like with that parameter, it can make sense to set the tolerance to zero to ensure the most accurate Hessians.
|
| StorageLevel | int | 1 |
How much of the minimization history is kept: 1 stores the full sequence of iterations, while 0 keeps only the last iterations.
This does not affect the minimization result, only the trace that can be inspected afterwards.
|
Definition at line 247 of file MnStrategy.h.