noshu / rustimization

Collection of Optimization algorithm in Rust
MIT License
52 stars 10 forks source link

approx_fprime_helper #2

Open nilgoyette opened 6 years ago

nilgoyette commented 6 years ago

Hi, I'm trying to port a python project to Rust and I'm using your library as a replacement to scipy.optimize. rustimization seems to be working ok but there's something I don't like. In scipy/optimize/lbfgsb.py, we can find this

    if jac is None:
        def func_and_grad(x):
            f = fun(x, *args)
            g = _approx_fprime_helper(x, fun, epsilon, args=args, f0=f)
            return f, g

which is to say 1) use this if g wasn't provided 2) use the last value of f() when calling g(). Using your library, doing 1) is possible, but it's impossible to do 2). It's quite important if f() is expensive.

I already coded _approx_fprime_helper and I'm pretty sure I can code this myself in your library. My question is more: is this project still alive? Do you accept PR?

nilgoyette commented 6 years ago

is this project still alive?

Anyone?

nilgoyette commented 6 years ago

@noshu

noshu commented 6 years ago

Currently I am little bit busy with my work so I am unable to spend time on this repository. But in future i have some plans with it. And yeah i do accept PR.