-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
CMA-ES #5
Comments
Hi, Thanks for your interest in contributing to argmin! CMA-ES would be a great addition to argmin and I'd very much appreciate it if you would implement this. We've recently made a lot of changes (#3 ) to the code, therefore it could easily happen that you run into unforeseen problems. Also, the documentation isn't everywhere up to date yet and may sometimes be not very helpful, outright wrong or may not exist at all. Please don't hesitate to get in touch in case you have any problems, suggestions of if your code requires changes to the overall design of argmin. |
Hi @Armavica, Have you had a chance to give this a try yet? Is there anything I can help you with? |
Hi! Sorry for the delay, I have been busy and out of the country for the last few weeks. I do have a working prototype, and I wanted to add more tests before submitting it. I will do that as soon as I find time. |
Sounds great! :) |
I would be interested in implementing this algorithm and others for a chemical yield optimisation project at work. I have only recently started learning Rust but am happy to try and develop further with help. If this has already been done then perhaps there is something else I can help with. |
Hi @PyPete , thanks for your interest in contributing! I haven't heard anything from @Armavica in a while, so I'm not sure what the current status of this is. I'm still very much interested in an implementation of CMA-ES. Unless Armavica objects I would suggest that you start working on this feature if you like. Should Armavica come back to this I'm sure that there will be the possibility to merge the implementations. I'm happy to help you with the implementation and guide you. Just open a WIP pull request and don't hesitate to ask any questions :) |
Hi @stefan-k, I'll take care of this issue, if you don't mind! I already have a working implementation of this algorithm in Scala https://github.com/VolodymyrOrlov/cma-es-scala and I think I have a good understanding on how the method works |
@VolodymyrOrlov sounds great! :) The only other population based method so far is particle swarm optimization which uses |
Agree! Looks like my state will have to carry on a NxP 2d array, where N is my population size and P is number of parameters. This way I'll be able to quickly perform Eigendecomposition operation, which is a central operation in CMA-ES. |
I also need to add these new operations to the
I hope you don't mind me implementing all these new methods and traits for CMA-ES :) |
Currently the If you need to carry state which is very specific to CMA-ES, then you can of course store them in your CMA-ES struct.
Not at all! :)
I think this is already covered with argmin/argmin-math/src/ndarray_m/dot.rs Line 35 in 2943e25
But I have no objections to split this off into an |
@stefan-k , while working on CMA-ES I've stumbled upon this implementation of a dot product between 2 matrices: |
Also, I am not sure I understand why this test should fail:
|
I've had a closer look and I agree, the transpose is complete nonsense. Not only that, the entire implementation makes no sense at all! This is quite embarrassing. I have no idea what I was thinking. Sorry about any inconvenience this has caused and thanks for digging into this! I would appreciate it if you could replace that with your working implementation. |
No worries, @stefan-k ! There are no "right" and "wrong" implementations, only implementations that works and ones that don't. I assume existing implementation works just fine for BFGS, hence it is good enough. But I will replace it with another version, that can handle both my and BFGS use cases. |
I'd argue the current implementation is definitely wrong, even for BFGS ;) The only reason why nobody noticed/complained is likely because people tend to (and should) use the ndarray/nalgebra math backends for matrix/linalg-heavy solvers. The |
Hello,
CMA-ES is a powerful evolutionary algorithm for black-box optimization problems. If there is interest in adding it to this optimization suite, I would be happy to give it a try. My plan is to start by following the
purecma.py
implementation, a public domain pedagogical implementation by the author of the algorithm, and add more advanced features if necessary.The text was updated successfully, but these errors were encountered: