Closed Baughn closed 8 years ago
I agree that giving the user the option to set the initial value of the number of iterations might be useful. Beware though that to have sufficient statistics for function value comparisons you should not go much lower than 30. I'll merge you PR and then add some additional documentation.
I don't know whether your process allows for this, but if you can obtain a cheaper, even if less reliable approximation of the function this would be a better way to go. Otherwise if you do not care about the local optimality guarantees of this algorithm you can try using the minimizeSPSA
algorithm instead.
My additional refactoring is in commit 63c5c9fecb77fbbbe3dd343fde93fe006efeefa2 . I renamed the kwarg to funcNinit, which seems closer to what it controls (= the initial number N of function evaluations) and added a conversion to int if mistakingly a float value is passed.
Thanks for the tips. I'm still working out what the best way to do this is... actually, yes, I do think I can get more samples, if I relax some constraints.
Wish I could talk to you about the details. Say, have you ever considered joining Google? ;-)
Haha, well if you can share more info about the optimization problem with me (without me needing to be part of Google), I'd be happy to chat. Just shoot me an email.
Reasoning: I'm using this to optimize a real-world process, taking minutes per iteration. 30 iterations is too much. Have to say I love your optimizer, though. :)