CMA-ES / libcmaes

libcmaes is a multithreaded C++11 library with Python bindings for high performance blackbox stochastic optimization using the CMA-ES algorithm for Covariance Matrix Adaptation Evolution Strategy
Other
321 stars 78 forks source link

Expose surrogate interface through Python bindings #75

Closed beniz closed 9 years ago

beniz commented 9 years ago

Ability to easily use surrogates from Python.

beniz commented 9 years ago

This is being blocked until #83 is resolved

This is being affected by #83, but I now believe it should be able to expose the train() and predict() function is such a manner that they could be filled up from Python code. This would unlock the ability to use machine learning algorithms that are written in Python as surrogates.

EDIT: update.

beniz commented 9 years ago

Code shell is in place for using an external ranker from Python directly. Next step is to test and run experiments with scikit-learn learning to rank framework and/or TreeRankSVM

beniz commented 9 years ago

There's now full support for setting/testing surrogates from Python directly. I've added an example file that shows how calling any regressor from scikit-learn is a change of a couple lines at most.

Libcmaes and the Python bindings support regressors and ordinal regressors alike, without any change.

I hope this will allow those interested to experiment with surrogates at large. Below is a fragment of a test run with NuSVR (SVM regressor) on Rosenbrock: py_surr_rosen_svr

I've played a bit with the different regressors and could not beat the existing implementation with Ranking SVM. Gradient boosting and NuSVR seem to behave best among scikit-learn regressors.