|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.freehep.math.fminuit.FMinuitCommands
hep.aida.ref.optimizer.fminuit.MinuitCommands
public class MinuitCommands
Minuit commands.
| Field Summary | |
|---|---|
protected static int |
DETAILED_OUTPUT
|
protected static int |
MATRIX_DIAGONAL_APPROX
|
protected static int |
MATRIX_FULL_ACCURATE
|
protected static int |
MATRIX_FULL_FORCED_POS
|
protected static int |
MATRIX_NOT_CALCULATED
The possible status of the covariance matrix |
protected static int |
MAXIMAL_OUTPUT
|
protected static int |
MIGRAD_MIN
|
protected static int |
MINIMAL_OUTPUT
|
protected static int |
MINIMIZE_MIN
|
protected static int |
NO_OUTPUT
The printout levels for the minimizer output are the following: |
protected static int |
NORMAL_OUTPUT
|
protected static int |
SIMPLEX_MIN
The different types of minimization. |
| Constructor Summary | |
|---|---|
protected |
MinuitCommands(MinuitOptimizer theOptimizer)
Default constructor. |
| Method Summary | |
|---|---|
protected double[][] |
calculateContour(String parName1,
String parName2)
Calculate the Error Matrix in the current configuration. |
protected double[][] |
calculateContour(String parName1,
String parName2,
int nPoints)
|
protected double[][] |
calculateContour(String parName1,
String parName2,
int nPoints,
double nSigmas)
|
protected void |
fixVariable(String varName)
|
protected double[][] |
getCovarianceMatrix()
|
protected double |
getErrorDef()
Get the value of UP, the errorDefinition. |
protected int |
getNVariables()
Get the number of (released) variables in the minimization. |
protected int |
getStatus()
Get the status of the fit. |
protected void |
loadAndInitialize()
|
protected void |
minos()
Perform the Minos error analysis on the specified variables. |
protected void |
optimize(String method,
int maxIterations,
double tolerance)
Minimize the function. |
protected void |
resetMinuit()
Reset Minuit. |
protected void |
setErrorDef(int errDef)
Set the Error Definition, the Minuit UP value. |
protected void |
setErrorDefinition(double errDef)
|
protected void |
setFunction(hep.aida.IFunction function,
MinuitOptimizer optimizer)
Set the function to be minimized. |
protected void |
setPrecision(double precision)
Informs Minuit on the machin precision. |
void |
setPrintLevel(int printLevel)
|
protected void |
setStrategy(int strategy)
Set the strategy to be used in calculating the first and second derivative and in certain optimization methods. |
protected void |
setUseFunctionGradient(boolean useFunctionGradient)
Tell Minuit if the derivatives provided by the function are to be used. |
protected void |
updateFunction(MinuitOptimizer optimizer)
|
| Methods inherited from class org.freehep.math.fminuit.FMinuitCommands |
|---|
evaluateDerivatives, evaluateFunction, finalizeFunction, initializeFunction, jmncont, jmnemat, jmnerrs, jmnexcm, jmninit, jmnparm, jmnpout, jmnseti, jmnstat, loadAndInitialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int MATRIX_NOT_CALCULATED
protected static final int MATRIX_DIAGONAL_APPROX
protected static final int MATRIX_FULL_FORCED_POS
protected static final int MATRIX_FULL_ACCURATE
protected static final int NO_OUTPUT
protected static final int MINIMAL_OUTPUT
protected static final int NORMAL_OUTPUT
protected static final int DETAILED_OUTPUT
protected static final int MAXIMAL_OUTPUT
protected static final int SIMPLEX_MIN
protected static final int MIGRAD_MIN
protected static final int MINIMIZE_MIN
| Constructor Detail |
|---|
protected MinuitCommands(MinuitOptimizer theOptimizer)
| Method Detail |
|---|
protected void loadAndInitialize()
public void setPrintLevel(int printLevel)
throws IllegalArgumentException
IllegalArgumentExceptionprotected void resetMinuit()
protected void setFunction(hep.aida.IFunction function,
MinuitOptimizer optimizer)
function - The function to be minimized.protected void updateFunction(MinuitOptimizer optimizer)
protected void fixVariable(String varName)
protected int getStatus()
protected int getNVariables()
protected double getErrorDef()
protected void setErrorDef(int errDef)
errDef - The new value for the Error Definitionprotected void setErrorDefinition(double errDef)
protected void setUseFunctionGradient(boolean useFunctionGradient)
protected void setStrategy(int strategy)
protected void setPrecision(double precision)
protected void optimize(String method,
int maxIterations,
double tolerance)
method - The optimization method. It can be:
- SIMPLEX performs a minimixation using the simplex method of
Nedler and Mead. The minimization will stop after maxIter call have
been performed or when the EDM is less than the tolerance (default
is 0.1*UP)
- MIGRAD The default minimization using the Migrad method. maxIter is the (optional)
maximum amount of iterations; when this is reached the minimization will
stopped even if it did not converge. The minimization converges when
the EDM is less than 0.001*tolerance*UP.
- MINIMIZE It starts by using the MIGRAD minimization; it this
does not converge it switches to the SIMPLEX method.
- IMPROVE If a previous minimization has converged and the function is in
and optimal solution, it searches for additional global optimal points.
The calculation will be stopped after maxIterations calls.
- SEEK Causes a Monte Carlo minimization of the function, by choosing uniformely random values
of the variables in an hypercube centered in the current variable values. The size of the
hypercube is specified by the value of tolerance.maxIterations - The maximum amount of allowed iterations.tolerance - The tolerance for the minimization.protected void minos()
true if the command was successfull; false otherwise.
Check the status of the minimization to know what went wrong.
protected double[][] calculateContour(String parName1,
String parName2)
true if the error matrix was calculated successfully.
false otherwise.
protected double[][] calculateContour(String parName1,
String parName2,
int nPoints)
protected double[][] calculateContour(String parName1,
String parName2,
int nPoints,
double nSigmas)
protected double[][] getCovarianceMatrix()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||