Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lua alternative to optim()

I'm currently looking for a lua alternative to the R programming languages; optim() function, if anyone knows how to deal with this?

like image 204
Skeen Avatar asked Aug 16 '26 12:08

Skeen


1 Answers

http://numlua.luaforge.net/ looks interesting but doesn't seem to have minimization. The most promising lead seems to be a Lua wrapper for GSL, which has a variety of multidimensional minimization algorithms included.

With derivatives - BFGS (method="BFGS" in optim) and two conjugate gradient methods (Fletcher-Reeves and Polak-Ribiere) which are two of the three options available for method="CG" in optim. Without derivatives - the Nelder-Mead simplex (method="Nelder-Mead", the default in optim).

More specifically, see here for the Lua shell documentation covering minimization.

I agree with @Zack that you should try to use existing implementations if at all possible, and that you might need a little bit more background knowledge to know which algorithms will be useful for your particular problems ...

like image 175
Ben Bolker Avatar answered Aug 20 '26 17:08

Ben Bolker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!