On Sat, 23 Nov 2013 11:48:04 -0800 (PST), rambor wrote:
Hi Thomas,
Thank you for your help, it worked but uncovered a new problem. I am
doing
the ill conditioned example in the test subdirectory of the src. I
can make
a new instance of the NonLinearConjugateGradientOptimizer Class as:
NonLinearConjugateGradientOptimizer optimizer = new
NonLinearConjugateGradientOptimizer(NonLinearConjugateGradientOptimizer.Formula.POLAK_RIBIERE,
new SimpleValueChecker(1e-13, 1e-13), new BrentSolver(1e-15, 1e-15));
However, on the next line, when I try to use the optimize method I
get
another error:
PointValuePair optimum1 =
optimizer.optimize(200, problem,
GoalType.MINIMIZE, new
double[] { 0, 1, 2, 3 });
java: no suitable method found for
optimize(int,Regularizers.LinearProblem,org.apache.commons.math3.optim.nonlinear.scalar.GoalType,double[])
method
org.apache.commons.math3.optim.nonlinear.scalar.gradient.NonLinearConjugateGradientOptimizer.optimize(org.apache.commons.math3.optim.OptimizationData...)
is not applicable
(argument type int does not conform to vararg element type
org.apache.commons.math3.optim.OptimizationData)
Should 200 be a MaxEval object?
Yes.
And the initial guess should be wrapped into an instance of
org.apache.commons.math3.optim.InitialGuess
Be warned that a new API has been proposed, currently tested for the
least-squares problem:
https://issues.apache.org/jira/browse/MATH-1026
[You are most welcome to help figure out how this could be applied to
the "scalar" optimizers.]
Regards,
Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]