This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python library for Bayesian Optimization.

Project Description

BOlib

A python library for Bayesian Optimization.

Setup BOlib

  • The following packages must be installed before installing BOlib
# for ptyhon3
apt-get install python3-numpy python3-scipy python3-matplotlib
# or for python2
apt-get install python-numpy python-scipy python-matplotlib
# gfortran is required if DIRECT optimizer is needed
apt-get install gfortran
# is also recommended to install libopenblas-base for multi-core systems
apt-get install libopenblas-base
  • Create and activate virtualenv (for python2) or venv (for ptyhon3)
# for ptyhon3
python3 -m venv --system-site-packages .env
# or for python2
virtualenv --system-site-packages .env

source .env/bin/activate
  • Install BOlib package
python -m pip install bolib
# if DIRECT optimizer is needed
python -m pip install bolib[direct]

Run BOlib

  • Create an example configuration
vi example/example_config.json
{
  "of": "branin",
  "solver": {
    "module": "bayesian_optimization",
    "optimizer": {
      "module": "random_grid",
      "initial_sample": 10
    },
    "af": {
      "module": "ei",
      "xi": 0.001
    },
    "model": {
      "module": "gaussian_process",
      "fit": {
        "module": "hparam_optimization",
        "noiseless": 1,
        "restarts": 10,
        "opt": 1,
        "estimator": "ML"
      },
      "kernel": "squared_exponential"
    }
  }
}
  • Run example
bolib run --input example/example_config.json --output output.json --verbose
  • Generate an animation of the previous experiment
bolib view --input output.json --output output.gif

Use BOlib as a library

  • You can also install BOlib and use its modules in your python script
import bolib.models.gp.gaussian_process as GP
  • Hint: Try the following line to execute with the working directory in the current location of the bash:
python -m bolib run --input example/example_config.json --output output.json --verbose

Extend BOlib with your own modules

  • You can also add you own modules. BOlib imports modules from the current working directory. Edit the example_config.json as follows
...
"of": "YOUR_PACKAGE.YOUR_OF",
...

Develop BOlib

  • Download the repository using git
git clone https://github.com/ibaidev/bolib.git
cd bolib
git config user.email 'MAIL'
git config user.name 'NAME'
git config credential.helper 'cache --timeout=300'
git config push.default simple
  • The following packages must be installed after installing BOlib
python -m pip install bolib twine wheel
  • Upload distribution
python setup.py sdist bdist_wheel
twine upload dist/*
Release History

Release History

This version
History Node

0.16.0

History Node

0.15.2

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bolib-0.16.0-py2.py3-none-any.whl (13.4 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel May 8, 2017
bolib-0.16.0.tar.gz (19.0 kB) Copy SHA256 Checksum SHA256 Source May 8, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting