commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject Re: [Math] NonLinearConjugateGradientOptimizer
Date Wed, 28 Sep 2011 09:50:58 GMT

> I am working on limited dependent variable regressions. I am testing part of
> a logit regression routine. As part of the estimation technique I am need to
> do some nonlinear optimization. Using the
> NonLinearConjugateGradientOptimizer, I submit my problem, but get the
> following exception:
> org.apache.commons.math.exception.MathIllegalStateException: unable to
> bracket optimum in line search
>     at
> org.apache.commons.math.optimization.general.NonLinearConjugateGradientOptimizer.findUpperBound(
>     at
> org.apache.commons.math.optimization.general.NonLinearConjugateGradientOptimizer.doOptimize(
>     at
>     at
> org.apache.commons.math.optimization.general.AbstractScalarDifferentiableOptimizer.optimize(
> I have checked that the gradients are consistent with the object function. I
> have verified that numerical (finite differences) gradient and my analytical
> one agree. Since the problem is logit, there is no issue of negative
> numbers.
> What could I be doing wrong? The solver is called using Polak-Ribiere
> updating scheme.

I'd suggest to modify your copy of "NonLinearConjugateGradientOptimizer",
adding "println" statements[1] so that you can see why "findUpperBound"
fails. [It seems that the "step" might be too large in your case.]


[1] No logging unfortunately... :-{

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message