commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Sterijevski <gsterijev...@gmail.com>
Subject Re: [Math] NonLinearConjugateGradientOptimizer
Date Thu, 29 Sep 2011 21:51:04 GMT
Gilles,

I have done what you suggested and notice that it (the optimizer) takes
humongous steps in the search for an upper bound. I tried making the initial
step size smaller, but to no avail.

The Powell optimizer flies very quickly to an optimum. Maybe there is some
misunderstanding in my usage of the optimizer... Has anyone used this
optimizer (NonLinearConjugateGradient) for maximum likelihood estimation?

Thanks,

-Greg

On Wed, Sep 28, 2011 at 4:50 AM, Gilles Sadowski <
gilles@harfang.homelinux.org> wrote:

> Hi.
>
> >
> > 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(NonLinearConjugateGradientOptimizer.java:258)
> >     at
> >
> org.apache.commons.math.optimization.general.NonLinearConjugateGradientOptimizer.doOptimize(NonLinearConjugateGradientOptimizer.java:185)
> >     at
> >
> org.apache.commons.math.optimization.direct.BaseAbstractScalarOptimizer.optimize(BaseAbstractScalarOptimizer.java:130)
> >     at
> >
> org.apache.commons.math.optimization.general.AbstractScalarDifferentiableOptimizer.optimize(AbstractScalarDifferentiableOptimizer.java:79)
> >
> >
> > 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.]
>
> Regards,
> Gilles
>
>
> [1] No logging unfortunately... :-{
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message