initial commit

This commit is contained in:
Niko Feith 2023-02-03 11:34:24 +01:00
parent df79df9808
commit cf400926dc
2 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -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()