edu.stanford.nlp.optimization
Class PenaltyConstrainedMinimizer
java.lang.Object
|
+--edu.stanford.nlp.optimization.PenaltyConstrainedMinimizer
- All Implemented Interfaces:
- ConstrainedMinimizer, Minimizer
- public class PenaltyConstrainedMinimizer
- extends Object
- implements ConstrainedMinimizer
A wrapper class which builds a constrained minimizer out of an
unconstrained one by finding the unconstrained minimum of a
sequence of penalized surfaces. It assumes that the objective it
is given is a DiffFunction
, even if the base
unconstrained minimzer just ignores the derivative information.
The desired unconstrained minimizer is passed in on construction:
Minimizer m = new SomeUnconstrainedMinimizer();
ConstrainedMinimizer cm = new PenaltyConstrainedMinimizer(m);
- Since:
- 1.0
- See Also:
ConstrainedMinimizer
Method Summary |
double[] |
minimize(Function function,
double functionTolerance,
double[] initial)
Attempts to find an unconstrained minimum of the objective
function starting at initial , within
functionTolerance . |
double[] |
minimize(Function function,
double functionTolerance,
Function[] eqConstraints,
double eqConstraintTolerance,
Function[] ineqConstraints,
double ineqConstraintTolerance,
double[] initial)
The general case, allowing both equality and inequality
constraints. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PenaltyConstrainedMinimizer
public PenaltyConstrainedMinimizer(Minimizer minimizer)
minimize
public double[] minimize(Function function,
double functionTolerance,
Function[] eqConstraints,
double eqConstraintTolerance,
Function[] ineqConstraints,
double ineqConstraintTolerance,
double[] initial)
- Description copied from interface:
ConstrainedMinimizer
- The general case, allowing both equality and inequality
constraints. A given implementation can throw an
UnsupportedOperationException if it cannot handle the constraints
it is supplied.
It is expected that
minimize(function, functionTolerance,
[], 0, [], 0, initial)
behave exactly like the
minimize(function, functionTolerance, initial)
method inherited from Minimizer
.
- Specified by:
minimize
in interface ConstrainedMinimizer
- Parameters:
function
- the objective functionfunctionTolerance
- a double
valueeqConstraints
- an array of zero or more equality constraintseqConstraintTolerance
- the violation tolerace for equality constraintsineqConstraints
- an array of zero or more inequality constraintsineqConstraintTolerance
- the violation tolerace for equality constraintsinitial
- a initial feasible (!) point
- Returns:
- a minimizing feasible point
minimize
public double[] minimize(Function function,
double functionTolerance,
double[] initial)
- Description copied from interface:
Minimizer
- Attempts to find an unconstrained minimum of the objective
function
starting at initial
, within
functionTolerance
.
- Specified by:
minimize
in interface Minimizer
- Parameters:
function
- the objective functionfunctionTolerance
- a double
valueinitial
- a initial feasible point
Stanford NLP Group