ur-whitelab / BO-LIFT

BayesOpt + LIFT
65 stars 12 forks source link

Experiment 3 - BayesOpt #5

Closed whitead closed 1 year ago

whitead commented 1 year ago
# defining the function. At y=0 to get a 1D cut at the origin
def ackley_1d(x, y=0):

    # the formula is rather large
    out = (-20*np.exp(-0.2*np.sqrt(0.5*(x**2 + y**2))) 
           - np.exp(0.5*(np.cos(2*np.pi*x) + np.cos(2*np.pi*y)))
           + np.e + 20)

    # returning
    return out