From cf400926dc3047012fa5df66c4c1789bdeb5b0ce Mon Sep 17 00:00:00 2001 From: "nikolaus.feith" Date: Fri, 3 Feb 2023 11:34:24 +0100 Subject: [PATCH] initial commit --- BayesianOptimization/BOwithGym.py | 2 -- PolicyModel/GaussianModel.py | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/BayesianOptimization/BOwithGym.py b/BayesianOptimization/BOwithGym.py index ffe3097..103f544 100644 --- a/BayesianOptimization/BOwithGym.py +++ b/BayesianOptimization/BOwithGym.py @@ -10,8 +10,6 @@ import time import matplotlib.pyplot as plt -from warnings import catch_warnings, simplefilter - class BayesianOptimization: def __init__(self, env, nr_step, nr_init=3, acq='ei', nr_weights=8, policy_seed=None): self.env = env diff --git a/PolicyModel/GaussianModel.py b/PolicyModel/GaussianModel.py index 130e1d1..21cbf35 100644 --- a/PolicyModel/GaussianModel.py +++ b/PolicyModel/GaussianModel.py @@ -38,9 +38,9 @@ class GaussianPolicy: def plot_policy(self): x = np.linspace(0, self.nr_steps, self.nr_steps) plt.plot(x, self.trajectory) - for i in self.mean: - gaussian = np.exp(-0.5 * (x - i)**2 / self.std**2) - plt.plot(x, gaussian) + # for i in self.mean: + # gaussian = np.exp(-0.5 * (x - i)**2 / self.std**2) + # plt.plot(x, gaussian) plt.show()