Coder Social home page Coder Social logo

Comments (11)

jtromans avatar jtromans commented on May 8, 2024 1

I've seen this behavior with other implementations too. My understanding is that the time taken to calculate the GP will scale cubically with the number of observations. However, the actual calculation itself should be relatively quick, especially compared to the black-box function.

from bayesianoptimization.

fmfn avatar fmfn commented on May 8, 2024 1

I resisted intervening here since the optimizer could be made faster by the user. However I decided to bite the bullet and make the changes. See #176

from bayesianoptimization.

KOLANICH avatar KOLANICH commented on May 8, 2024 1

@KOLANICH what other optimizers have you used? any of them do Bayesian optimization?

Here is the list: https://gitlab.com/KOLANICH/UniOpt.py/tree/master/UniOpt/backends

from bayesianoptimization.

fmfn avatar fmfn commented on May 8, 2024

You control the training of the underlying Gaussian Process by passing **gp_params to the maximize method. The default behaviour included 25 rounds of pseudo-likelihood optimization, which happening internally within sklearn's GP.

Is this pattern consistent? GPs are finicky, sometime I find you get odd numerical instabilities throwing you off. Increasing alpha usually helps, since it makes the process of inverting the covariance matrix more stable.

from bayesianoptimization.

tachim avatar tachim commented on May 8, 2024

I'm also seeing this behavior, and increasing alpha doesn't do anything

from bayesianoptimization.

cotterpl avatar cotterpl commented on May 8, 2024

I'm also seeing this behavior. Alpha doesn't change anything:

from bayes_opt import BayesianOptimization

def toOptimize(a=0):
    return - a * a

optimizer = BayesianOptimization(toOptimize,{'a': [-5,5]})
optimizer.maximize(n_iter=200)
print(optimizer.res)
Initialization
-----------------------------------------
 Step |   Time |      Value |         a | 
    1 | 00m00s |  -22.89916 |   -4.7853 | 
    2 | 00m00s |   -1.10813 |    1.0527 | 
    3 | 00m00s |   -0.01665 |    0.1290 | 
    4 | 00m00s |   -4.29761 |    2.0731 | 
    5 | 00m00s |   -0.07172 |    0.2678 | 
Bayesian Optimization
-----------------------------------------
 Step |   Time |      Value |         a | 
    6 | 00m00s |  -25.00000 |    5.0000 | 
    7 | 00m00s |   -0.49688 |   -0.7049 | 
    8 | 00m01s |   -0.03670 |   -0.1916 | 
    9 | 00m02s |   -0.00059 |   -0.0243 | 
   10 | 00m03s |   -0.00044 |    0.0210 | 

And it keeps getting slower with each iteration

from bayesianoptimization.

jjiteshh avatar jjiteshh commented on May 8, 2024

me too! it gets too slow after a while..

from bayesianoptimization.

hofesh avatar hofesh commented on May 8, 2024

Seeing same behaviour. Takes several seconds for each iteration even with a dummy target function.

from bayesianoptimization.

KOLANICH avatar KOLANICH commented on May 8, 2024

In fact it is the slowest optimizer of all I have ever used. And the results are worse than the ones of the faster optimizers on the same iteration count. So I personally have never used it in production.

from bayesianoptimization.

nshervt avatar nshervt commented on May 8, 2024

In fact it is the slowest optimizer of all I have ever used. And the results are worse than the ones of the faster optimiz3rs on the same iteration count. So I personally have never used it in production.

@KOLANICH what other optimiz3rs have you used? any of them do Bayesian optimization?

from bayesianoptimization.

louis925 avatar louis925 commented on May 8, 2024

I also see the same slow down behavior at around 400+ iterations with 10 parameters to being optimized. Now the 5 fold training of my model take much less time than the calculation of Bayesian optimization.

from bayesianoptimization.

Related Issues (20)

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.