Skip to content

Instantly share code, notes, and snippets.

@avisheknag17
Created June 12, 2021 14:54
Show Gist options
  • Save avisheknag17/0aba35289df150a503609eb666511e87 to your computer and use it in GitHub Desktop.
Save avisheknag17/0aba35289df150a503609eb666511e87 to your computer and use it in GitHub Desktop.
from sklearn.gaussian_process import GaussianProcessRegressor
from scipy.stats import norm
from scipy.optimize import minimize
import sys
import pandas as pd
class BayesianOptimizer():
def __init__(self, target_func, x_init, y_init, n_iter, scale, batch_size):
self.x_init = x_init
self.y_init = y_init
self.target_func = target_func
self.n_iter = n_iter
self.scale = scale
self.batch_size = batch_size
self.gauss_pr = GaussianProcessRegressor()
self.best_samples_ = pd.DataFrame(columns = ['x', 'y', 'ei'])
self.distances_ = []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment