Code Monkey home page Code Monkey logo

combo's Introduction

COMmon Bayesian Optimization Library ( COMBO )

Bayesian optimization has been proven as an effective tool in accelerating scientific discovery. A standard implementation (e.g., scikit-learn), however, can accommodate only small training data. COMBO is highly scalable due to an efficient protocol that employs Thompson sampling, random feature maps, one-rank Cholesky update and automatic hyperparameter tuning. Technical features are described in our document.

Required Packages

  • Python 2.7.x
  • numpy >=1.10
  • scipy >= 0.16
  • Cython >= 0.22.1
  • mpi4py >= 2.0 (optional)

Install

1. Download or clone the github repository, e.g.
	> git clone https://github.com/tsudalab/combo.git

2. Run setup.py install
	> cd combo
	> python setup.py install

Uninstall

1. Delete all installed files, e.g.
	> python setup.py install --record file.txt
	> cat file.txt  | xargs rm -rvf

Usage

After installation, you can launch the test suite from 'examples/grain_bound/tutorial.ipynb'.

License

This package is distributed under the MIT License.

combo's People

Contributors

k-yoshimi avatar kojitsuda avatar rtmr avatar tsuyos-u avatar yomichi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

combo's Issues

Data file for tutorial (s5-210.csv) is missing

@tsuyos-u
The tutorial (examples/grain_bound/tutorial.ipynb) tries to download data file (s5-210.csv) from www.tudalab.org. However, currently access to the file is rejected by the web server:

--2019-11-27 17:15:03--  https://tsudalab-public-files.s3-ap-northeast-1.amazonaws.com/s5-210.csv
Resolving tsudalab-public-files.s3-ap-northeast-1.amazonaws.com (tsudalab-public-files.s3-ap-northeast-1.amazonaws.com)... 52.219.68.139
Connecting to tsudalab-public-files.s3-ap-northeast-1.amazonaws.com (tsudalab-public-files.s3-ap-northeast-1.amazonaws.com)|52.219.68.139|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2019-11-27 17:15:03 ERROR 403: Forbidden.

Could you please update the URL of the data file, if it's place has been changed?

How can I get f(x) value when GP (num_rand_basis = 0) was condcuted?

Hello developers,

I have a question about extraction of fmean and fcov after learning.

fmean = policy.predictor.get_post_fmean(policy.training, policy.test)
fcov = policy.predictor.get_post_fcov(policy.training, policy.test)

The above scripts worked when num_rand_basis was not set at 0.
However, it did not work when num_rand_basis was set at 0.

How can I get fmean and fcov values when GP (num_rand_basis = 0) was conducted?

The error message was as below

ValueError Traceback (most recent call last)
in ()
----> 1 fmean = policy.predictor.get_post_fmean(policy.training, policy.test)
2 fcov = policy.predictor.get_post_fcov(policy.training, policy.test)

/usr/local/lib/python2.7/dist-packages/combo/gp/predictor.pyc in get_post_fmean(self, training, test)
32 if self.model.stats is None:
33 self.prepare( training )
---> 34 return self.model.get_post_fmean( training.X, test.X )
35
36 def get_post_fcov( self, training, test, diag = True ):

/usr/local/lib/python2.7/dist-packages/combo/gp/core/model.pyc in get_post_fmean(self, X, Z, params)
102
103 if self.inf is 'exact':
--> 104 post_fmu = inf.exact.get_post_fmean(self, X, Z, params)
105
106 return post_fmu

/usr/local/lib/python2.7/dist-packages/combo/gp/inf/exact.pyc in get_post_fmean(gp, X, Z, params)
92 G = gp.prior.get_cov( X=Z, Z=X, params = prior_params )
93
---> 94 return G.dot(alpha) + fmu
95
96 def get_post_fcov(gp, X, Z, params = None, diag = True ):

ValueError: shapes (81,22) and (21,) not aligned: 22 (dim 1) != 21 (dim 0)

combo.misc.centering is not working

X = combo.misc.centering( X )

whenever I am trying to run the above line in spyder, it's showing one error as: 'AttributeError: module 'combo' has no attribute 'misc''.

Can anyone please give a solution of this!
Thanks in advance.

ModuleNotFoundError: No module named 'gp'

I have already installed numpy >=1.10, scipy >= 0.16 and Cython >= 0.22.1. But still get the ModuleNotFoundError.
Could anyone kindly tell me is there any dependency for the ‘gp’ here?

Missing .so files for running

This version of combo does not currently have the following cythonized files to run COMBO.
in combo/combo/gp/_src:

enhance_gauss.so

in combo/combo/misc/_src:

cholupdate.so
diagAB.so
logsumexp.so
traceAB.so

These files can be easily generated via cython but the current version of combo will throw an ImportError because it cannot find them, as only the .pyx and .c files are currently included.

Use `num_search_each_probe` for parallel evaluation of the objective

Hi developers of combo,

Thanks for providing a great library. I want to use it for my projects.

I have a question about multiple evaluations at each probe. For a function f(x) which takes a long time to run, I want to compute f(x) for a number of x values in parallel. To test this, I ran tutorial.ipynb with the following modifications:

res = policy.random_search(max_num_probes=5, simulator=simulator(), 
                           num_search_each_probe=4)

# Originally, max_num_probes=80 and num_search_each_prob=1
# I expect that the total amount of computation is not changed
res = policy.bayes_search(max_num_probes=20, simulator=simulator(), score='TS', 
                          interval=5, num_rand_basis=5000, num_search_each_probe=4)

Is this the right way to do parallel computation as explained above?

And I'm concerned about actual computation time. The modified code seems slower
than the original, specifically on policy.bayes_search():

Original: 99.50355625152588 [sec]
Modified: 1856.6796779632568 [sec]

I expected the computation time is proportional to the number of evaluations of f(x),
so I don't understand the significant difference. That's why I'm wondering that I'm not correct
on using parallel evaluation.

COMBO

Everything is installed, but the files in the run case are still not working. Has anyone solved the problem yet?

File "/home/wjw/python-file/666.py", line 4, in
import combo
File "/home/wjw/anaconda3/envs/COMBO1/lib/python2.7/site-packages/combo/init.py", line 1, in
import gp
File "combo/gp/cov/_src/enhance_gauss.pyx", line 1, in init combo.gp.cov._src.enhance_gauss
ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.