Code Monkey home page Code Monkey logo

bayesboost's Introduction

BayesBoost

Bayesian Optimization using xgboost and sklearn API

Simple test scripts for optimal hyperparameter of xgboost using bayesian optimization.

Original bayesian optimization code is from https://github.com/fmfn/BayesianOptimization and all credit for this work goes to the original author.

To run the examples below you will need to install this package (it is under constant development)

pip install git+https://github.com/fmfn/BayesianOptimization.git

Example 1. is based on the otto dataset from Kaggle, this remains in memory. (https://www.kaggle.com/c/otto-group-product-classification-challenge)

Example 2. is based on Avazu click prediction dataset from Kaggle and requires the 'distributed' version of xgboost. (https://www.kaggle.com/c/avazu-ctr-prediction)

Run

To get this running create a data/otto and data/avazu dir and download the datasets into the respective directories and unzip / untar the files.

Dependencies:

References:

bayesboost's People

Contributors

mpearmain 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  avatar

bayesboost's Issues

Otto example - IndexError: too many indices for array

Greetings,

Would you happen to know what causes this error while trying to run the Otto example? It manages to initialize the problem but produces the error as it transitions to maximize the function. I'm running the anaconda distribution with python 3.6.

`Initialization

Step | Time | Value | colsample_bytree | gamma | learning_rate | max_delta_step | max_depth | min_child_weight | n_estimators | subsample |

1 | 06m06s |   -0.32531 |             0.6182 |    0.9051 |          0.2812 |           0.0129 |      8.4669 |             2.6626 |       944.8025 |      0.7061 | 

2 | 02m56s |   -0.27711 |             0.7733 |    0.6258 |          0.1907 |           0.0931 |      5.4166 |             6.0346 |       616.8563 |      0.7488 | 

3 | 06m30s |   -0.28382 |             0.8422 |    0.0806 |          0.2088 |           0.0239 |      9.3391 |             5.7449 |       749.8462 |      0.7838 | 

4 | 06m32s |   -0.27949 |             0.9063 |    0.1119 |          0.2483 |           0.0400 |      8.9312 |             4.4974 |       801.3183 |      0.7566 | 

5 | 00m37s |   -0.44748 |             0.9505 |    0.6875 |          0.1109 |           0.0882 |      5.9782 |             5.9778 |       117.2441 |      0.7775 | 

IndexError Traceback (most recent call last)
in ()
71 })
72
---> 73 xgboostBO.maximize()
74 print('-'*53)
75

/home/ron/software/anaconda3/lib/python3.6/site-packages/bayes_opt/bayesian_optimization.py in maximize(self, init_points, n_iter, acq, kappa, xi, **gp_params)
262 gp=self.gp,
263 y_max=y_max,
--> 264 bounds=self.bounds)
265
266 # Print new header

/home/ron/software/anaconda3/lib/python3.6/site-packages/bayes_opt/helpers.py in acq_max(ac, gp, y_max, bounds)
53
54 # Store it if better than previous minimum(maximum).
---> 55 if max_acq is None or -res.fun[0] >= max_acq:
56 x_max = res.x
57 max_acq = -res.fun[0]

IndexError: too many indices for array`

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.