-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Nelder-mead multiparametric optimisation #560
Comments
You can actually add It might make sense to re-implement at least part of this in C. A lot is happening here, and I have the feeling that this is probably expensive. |
I can certainly create a PR, but the stuff in snippets doesn't seem to be being built into ulab firmware - am I missing something? |
No, you are not missing anything. The idea behind the Having said that, I think that this function should be implemented in C. The nested loops are expensive in By the way, I wonder, whether sim = np.empty((N + 1, N), dtype=x0.dtype) is correct: what happens, if you start out with an integer type? |
I don't really speak Micropython flavoured C, so I think I might struggle to translate this function. I'd be happy to tidy it up and add it as a snippet PR however - would you like me to do so? I've just copied this from the scipy implementation, and then converted to use the ulab functions, so I don't really know what would happen with an integer type. |
Yes, I think it would be great. It would also ease a bit on the time pressure. I'm willing to do this properly in C, but if there was a not-so-performant
I haven't tried it, either, but in the contraction step you are bound to leave the set of integers, I think. |
Describe the solution you'd like
I'd like to be able to do a multiparametric optimisation, ideally using the nelder-mead algorithm,as in scipy https://docs.scipy.org/doc/scipy/reference/optimize.minimize-neldermead.html.
I have rewritten the python code currently used in scipy, to be compatible with ulab (below) but there doesn't seem to be a way to include python code with ulab
Additional context
This is some calibration code for a magnetometer. This is tweaking the final results by adding a radial basis function to the output of the magnetometer output, which can account for non-linearity in the sensor. I have this working on my laptop, but I'd like to be able to use it on an embedded device
The text was updated successfully, but these errors were encountered: