Class MnStrategy
- java.lang.Object
-
- org.freehep.math.minuit.MnStrategy
-
public class MnStrategy extends java.lang.ObjectAPI class for defining three levels of strategies: low (0), medium (1), high (>=2).At many places in the analysis of the FCN (the user provided function), MINUIT must decide whether to be safe and waste a few function calls in order to know where it is, or to be fast and attempt to get the requested results with the fewest possible calls at a certain risk of not obtaining the precision desired by the user. In order to allow the user to infuence these decisions, the MnStrategy class allows the user to control different settings. MnStrategy can be instantiated with three different minimization quality levels for low (0), medium (1) and high (2) quality. Default settings for iteration cycles and tolerances are initialized then.
The default setting is set for medium quality. Value 0 (low) indicates to MINUIT that it should economize function calls; it is intended for cases where there are many variable parameters and/or the function takes a long time to calculate and/or the user is not interested in very precise values for parameter errors. On the other hand, value 2 (high) indicates that MINUIT is allowed to waste function calls in order to be sure that all values are precise; it is it is intended for cases where the function is evaluated in a relatively short time and/or where the parameter errors must be calculated reliably.
In addition all constants set in MnStrategy can be changed individually by the user, e.g. the number of iteration cycles in the numerical gradient.
Acts on: Migrad (behavioural), Minos (lowers strategy by 1 for Minos-own minimization), Hesse (iterations), Numerical2PDerivative (iterations)
-
-
Constructor Summary
Constructors Constructor and Description MnStrategy()Creates a MnStrategy object with the default strategy (medium)MnStrategy(int stra)Creates a MnStrategy object with the user specified strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgradientNCycles()doublegradientStepTolerance()doublegradientTolerance()doublehessianG2Tolerance()inthessianGradientNCycles()inthessianNCycles()doublehessianStepTolerance()booleanisHigh()booleanisLow()booleanisMedium()voidsetGradientNCycles(int n)voidsetGradientStepTolerance(double stp)voidsetGradientTolerance(double toler)voidsetHessianG2Tolerance(double toler)voidsetHessianGradientNCycles(int n)voidsetHessianNCycles(int n)voidsetHessianStepTolerance(double stp)voidsetLowStrategy()voidsetMediumStrategy()intstrategy()
-
-
-
Constructor Detail
-
MnStrategy
public MnStrategy()
Creates a MnStrategy object with the default strategy (medium)
-
MnStrategy
public MnStrategy(int stra)
Creates a MnStrategy object with the user specified strategy.- Parameters:
stra- The use defined strategy, 0=low, 1 medium, 2=high.
-
-
Method Detail
-
strategy
public int strategy()
-
gradientNCycles
public int gradientNCycles()
-
gradientStepTolerance
public double gradientStepTolerance()
-
gradientTolerance
public double gradientTolerance()
-
hessianNCycles
public int hessianNCycles()
-
hessianStepTolerance
public double hessianStepTolerance()
-
hessianG2Tolerance
public double hessianG2Tolerance()
-
hessianGradientNCycles
public int hessianGradientNCycles()
-
isLow
public boolean isLow()
-
isMedium
public boolean isMedium()
-
isHigh
public boolean isHigh()
-
setLowStrategy
public void setLowStrategy()
-
setMediumStrategy
public void setMediumStrategy()
-
setGradientNCycles
public void setGradientNCycles(int n)
-
setGradientStepTolerance
public void setGradientStepTolerance(double stp)
-
setGradientTolerance
public void setGradientTolerance(double toler)
-
setHessianNCycles
public void setHessianNCycles(int n)
-
setHessianStepTolerance
public void setHessianStepTolerance(double stp)
-
setHessianG2Tolerance
public void setHessianG2Tolerance(double toler)
-
setHessianGradientNCycles
public void setHessianGradientNCycles(int n)
-
-
DMelt 3.0 © DataMelt by jWork.ORG