mlpack / ensmallen

A header-only C++ library for numerical optimization --
http://ensmallen.org
Other
742 stars 120 forks source link

Implementation of negative weights, Sep-CMA, VD-CMA. Sep and VD CMA achieving linear time complexity. #349

Closed JohnToro-CZAF closed 2 years ago

JohnToro-CZAF commented 2 years ago

This is my implementation of CMA main class, the purpose of the class is to store the default parameters of the algorithm once the optimizer is created and allow us to add new variants easier since I split the main algorithm into many parts. Since many improvements of the CMA-ES algorithm use the same set of parameters as the original one and many formulas look the same, this new CMAES class will reduce code replication. Apart from renewal class. I also added:

I also planed to implement the IPOP restart strategy and Cholesky update policy but my time in GSOC is running out, but I still make another pull request in near future. Also, I have attached the benchmark results of variants of CMAES in logistic regression task with gisette dataset. Benchmark.pdf

JohnToro-CZAF commented 2 years ago

Have you run the CMAES test locally? When I run ./ensmallen_tests "[CMAESTest]", almost all tests fail.

I have successfully run all tests locally but in a separated manner './ensmallen_tests {test_case}" but not ./ensmallen_tests "[CMAESTest]". I run this command than test cases with the titanic dataset and vd-update logistic regression failed. With titanic test cases, In order to have this number: 60.393258427 accuracy, I ran locally multiple times to see the converging point of default CMAES - then I try on other variants, and the results are the same. So I decided to give that value as the default converge point for other variants. But I ran whole test again with '[CMAES]' than I got differently - maybe run whole test cases and run separated test using different random seed. I still don't know how to fix this, do you have any suggestion ?

JohnToro-CZAF commented 2 years ago

The current VD-update performance is not perfect. I ran it multiple times with logistic regression test case, frequently 1-2 times will fail ~ 90-94 accuracy over 10 times running. I think it is due to the new scale of parameter c1, cmu, csigma in the paper compared to old ones. I am still finding a way to get around this.

JohnToro-CZAF commented 2 years ago

I have added rescale learning rate function to Vd-update as in the paper. Now everything would be fine now with VD update. The problem with the titanic test is still remain.

mlpack-bot[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! :+1: