HIPS/Spearmint — pull request #7 by js850 (2014-10-14 08:47:27+00:00)
Title: add documentation, some code cleanup, and a bug fix

After seeing Jasper Snoek talk in cambridge I was inspired to try this bayesian optimization package. It seems well written and well commented, but without much documentation. I had a some difficulty trying to understand what all the variables meant and what all the routines were doing. So while I was going through the code in detail I added some documentation for my own benefit. Maybe you guys will appreciate it. But please go over my documentation carefully. The only thing worse then no documentation is incorrect documentation.

I also made some other changes.

1. I did a bit of code cleanup, like removing tabs, removing unused imports, changing 2-space indents to 4-space, shortening long lines, etc.

2. I added a new example for noisy functions. This is simply the branin function with some added noise.

3. I added a file make_plots.py to the simple branin example. Using your README I was able to easily run the example, but I had no idea what to do then. I didn't know how to access the data or make predictions or find the best guess for the minimum, or show uncertainties. make_plots.py is basically my solution to that, though it may be a bit hacky. You may want to update it if there are more elegant ways of doing this. I wrote it in a general way so it can be called from any experiment directory with a 2-dimensional function (e.g. examples/noisy)

4. I restructured main.py, separating out the part that reads in the options. I did this mostly because I wanted to re-use it for make_plots.py

5. I renamed some variables because I found it really hard to know if variable `tasks` referred to a list of `Task` objects or a list of task names (strings). This confused me a lot and I only changed a few of the examples.

Finally, thanks for the great code