SciML / NonlinearSolve.jl

High-performance and differentiation-enabled nonlinear solvers (Newton methods), bracketed rootfinding (bisection, Falsi), with sparsity and Newton-Krylov support.
https://docs.sciml.ai/NonlinearSolve/stable/
MIT License
226 stars 40 forks source link

Minor documentation problems #293

Closed DavidSagan closed 9 months ago

DavidSagan commented 9 months ago
ChrisRackauckas commented 9 months ago

The READM.md examples are off. In both, the functions are f(u,p) but prob is set to NonlinearProblem(f, u0) and IntervalNonlinearProblem(f, u0) which lacks the p argument. Note: The corresponding examples in docs are correct.

The readme examples run fine. The p is optional in the problem type.

It would help to have an example of a nonlinear least squares optimization.

Indeed this is a new feature and we need to get a tutorial for it.

DavidSagan commented 9 months ago

The readme examples run fine. The p is optional in the problem type.

If the function was defined as f(u; p) then this would be correct but with f(u, p) the p argument is not optional.

Also I cannot seem to get a nonlinear least square optimization going. Can you post a simple example here? Thanks.

ChrisRackauckas commented 9 months ago

No in the problem type it's optional. It's not optional for f. It's just like all of the other problem types.

avik-pal commented 9 months ago

Can you post a simple example here?

See this for now https://github.com/SciML/NonlinearSolve.jl/blob/master/test/nonlinear_least_squares.jl

DavidSagan commented 9 months ago

@avik-pal Much thanks! This is what I needed.

ChrisRackauckas commented 9 months ago

we still need a docs example