jsat.math.optimization
Interface Optimizer
-
- All Known Implementing Classes:
- BFGS, LBFGS, ModifiedOWLQN, NelderMead
public interface OptimizerThis interface defines a contract for multivariate function minimization.
Different optimization methods will use or require different amounts of information. Depending on the optimizer, the 1st derivative may not be necessary and can benull.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method and Description Optimizerclone()intgetMaximumIterations()Returns the maximum number of iterations to performdefault voidoptimize(double tolerance, Vec w, Vec x0, Function f, FunctionVec fp)Attempts to optimize the given function by finding the value ofwthat will minimize the value returned byf(w), using w = x0 as an initial starting point.voidoptimize(double tolerance, Vec w, Vec x0, Function f, FunctionVec fp, boolean parallel)Attempts to optimize the given function by finding the value ofwthat will minimize the value returned byf(w), using w = x0 as an initial starting point.voidsetMaximumIterations(int iterations)Sets the maximum number of iterations allowed for the optimization method
-
-
-
Method Detail
-
optimize
default void optimize(double tolerance, Vec w, Vec x0, Function f, FunctionVec fp)Attempts to optimize the given function by finding the value ofwthat will minimize the value returned byf(w), using w = x0 as an initial starting point.- Parameters:
tolerance- the value that the gradient norm must be less than to consider convergedw- the the location to store the final solutionx0- the initial guess for the solution. This value will not be changed, and intermediate matrices will be created as the same type.f- the objective function to minimizerfp- the derivative of the objective function, may benulldepending on the optimizer
-
optimize
void optimize(double tolerance, Vec w, Vec x0, Function f, FunctionVec fp, boolean parallel)Attempts to optimize the given function by finding the value ofwthat will minimize the value returned byf(w), using w = x0 as an initial starting point.- Parameters:
tolerance- the value that the gradient norm must be less than to consider convergedw- the the location to store the final solutionx0- the initial guess for the solution. This value will not be changed, and intermediate matrices will be created as the same type.f- the objective function to minimizerfp- the derivative of the objective function, may benulldepending on the optimizerparallel-trueif multiple threads should be used for optimization, orfalseif a single thread should be used.
-
setMaximumIterations
void setMaximumIterations(int iterations)
Sets the maximum number of iterations allowed for the optimization method- Parameters:
iterations- the maximum number of iterations to perform
-
getMaximumIterations
int getMaximumIterations()
Returns the maximum number of iterations to perform- Returns:
- the maximum number of iterations to perform
-
clone
Optimizer clone()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG