org.freehep.math.minuit
Class MnApplication
- java.lang.Object
-
- org.freehep.math.minuit.MnApplication
-
- Direct Known Subclasses:
- MnMigrad, MnMinimize, MnScan, MnSimplex
public abstract class MnApplication extends java.lang.ObjectBase class for minimizers.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(java.lang.String name, double val)add const parametervoidadd(java.lang.String name, double val, double err)add free parametervoidadd(java.lang.String name, double val, double err, double low, double up)add limited parameterbooleancheckAnalyticalDerivatives()MnUserCovariancecovariance()doubleerror(int index)doubleerror(java.lang.String name)doubleerrorDef()double[]errors()FCNBasefcnbase()voidfix(int index)voidfix(java.lang.String name)intindex(java.lang.String name)convert name into external number of parameterFunctionMinimumminimize()FunctionMinimumminimize(int maxfcn)FunctionMinimumminimize(int maxfcn, double toler)Causes minimization of the FCN and returns the result in form of a FunctionMinimum.java.lang.Stringname(int index)convert external number into name of parameterintnumOfCalls()MnUserParametersparameters()double[]params()access to parameters and errors in column-wise representationMnMachinePrecisionprecision()voidrelease(int index)voidrelease(java.lang.String name)voidremoveLimits(int index)voidremoveLimits(java.lang.String name)voidsetCheckAnalyticalDerivatives(boolean check)Minuit does a check of the user gradient at the beginning, if this is not wanted the set this to "false".voidsetError(int index, double err)voidsetError(java.lang.String name, double err)voidsetErrorDef(double errorDef)errorDef() is the error definition of the function.voidsetLimits(int index, double low, double up)voidsetLimits(java.lang.String name, double low, double up)voidsetPrecision(double prec)voidsetUseAnalyticalDerivatives(boolean use)By default if the function to be minimized implements FCNGradientBase then the analytical gradient provided by the function will be used.voidsetValue(int index, double val)voidsetValue(java.lang.String name, double val)MnUserParameterStatestate()MnStrategystrategy()booleanuseAnalyticalDerivaties()doublevalue(int index)doublevalue(java.lang.String name)intvariableParameters()
-
-
-
Method Detail
-
minimize
public FunctionMinimum minimize()
-
minimize
public FunctionMinimum minimize(int maxfcn)
-
minimize
public FunctionMinimum minimize(int maxfcn, double toler)
Causes minimization of the FCN and returns the result in form of a FunctionMinimum.- Parameters:
maxfcn- specifies the (approximate) maximum number of function calls after which the calculation will be stopped even if it has not yet converged.toler- specifies the required tolerance on the function value at the minimum. The default tolerance value is 0.1, and the minimization will stop when the estimated vertical distance to the minimum (EDM) is less than 0:001*tolerance*errorDef
-
precision
public MnMachinePrecision precision()
-
state
public MnUserParameterState state()
-
parameters
public MnUserParameters parameters()
-
covariance
public MnUserCovariance covariance()
-
fcnbase
public FCNBase fcnbase()
-
strategy
public MnStrategy strategy()
-
numOfCalls
public int numOfCalls()
-
params
public double[] params()
access to parameters and errors in column-wise representation
-
errors
public double[] errors()
-
add
public void add(java.lang.String name, double val, double err)add free parameter
-
add
public void add(java.lang.String name, double val, double err, double low, double up)add limited parameter
-
add
public void add(java.lang.String name, double val)add const parameter
-
fix
public void fix(int index)
-
release
public void release(int index)
-
setValue
public void setValue(int index, double val)
-
setError
public void setError(int index, double err)
-
setLimits
public void setLimits(int index, double low, double up)
-
removeLimits
public void removeLimits(int index)
-
value
public double value(int index)
-
error
public double error(int index)
-
fix
public void fix(java.lang.String name)
-
release
public void release(java.lang.String name)
-
setValue
public void setValue(java.lang.String name, double val)
-
setError
public void setError(java.lang.String name, double err)
-
setLimits
public void setLimits(java.lang.String name, double low, double up)
-
removeLimits
public void removeLimits(java.lang.String name)
-
setPrecision
public void setPrecision(double prec)
-
value
public double value(java.lang.String name)
-
error
public double error(java.lang.String name)
-
index
public int index(java.lang.String name)
convert name into external number of parameter
-
name
public java.lang.String name(int index)
convert external number into name of parameter
-
variableParameters
public int variableParameters()
-
setUseAnalyticalDerivatives
public void setUseAnalyticalDerivatives(boolean use)
By default if the function to be minimized implements FCNGradientBase then the analytical gradient provided by the function will be used. Set this tofalseto disable this behaviour and force numerical calculation of the gradient.
-
useAnalyticalDerivaties
public boolean useAnalyticalDerivaties()
-
setCheckAnalyticalDerivatives
public void setCheckAnalyticalDerivatives(boolean check)
Minuit does a check of the user gradient at the beginning, if this is not wanted the set this to "false".
-
checkAnalyticalDerivatives
public boolean checkAnalyticalDerivatives()
-
setErrorDef
public void setErrorDef(double errorDef)
errorDef() is the error definition of the function. E.g. is 1 if function is Chi2 and 0.5 if function is -logLikelihood. If the user wants instead the 2-sigma errors, errorDef() = 4, as Chi2(x+n*sigma) = Chi2(x) + n*n.
-
errorDef
public double errorDef()
-
-
DMelt 3.0 © DataMelt by jWork.ORG