Skip to content

Problem with initial guess #16

@ebelnikola

Description

@ebelnikola

I am not sure if this is intentional or not, but all the optimisation algorithms exit with an error if the initial guess was exactly at the optimum. The simplest example:
using OptimKit; alg=GradientDescent(;); fg(x)=sum(x.^2), 2.0 .*x; optimize(fg, [0.],alg);
This code terminates with an error "linesearch was not given a descent direction!". The same for the conjugate gradient algorithm. The LBFGS algorithm tries to start the linear search with d $d\phi_0=NaN$ and stalls without an error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions