initial commit
This commit is contained in:
parent
df79df9808
commit
cf400926dc
@ -10,8 +10,6 @@ import time
|
|||||||
|
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
from warnings import catch_warnings, simplefilter
|
|
||||||
|
|
||||||
class BayesianOptimization:
|
class BayesianOptimization:
|
||||||
def __init__(self, env, nr_step, nr_init=3, acq='ei', nr_weights=8, policy_seed=None):
|
def __init__(self, env, nr_step, nr_init=3, acq='ei', nr_weights=8, policy_seed=None):
|
||||||
self.env = env
|
self.env = env
|
||||||
|
@ -38,9 +38,9 @@ class GaussianPolicy:
|
|||||||
def plot_policy(self):
|
def plot_policy(self):
|
||||||
x = np.linspace(0, self.nr_steps, self.nr_steps)
|
x = np.linspace(0, self.nr_steps, self.nr_steps)
|
||||||
plt.plot(x, self.trajectory)
|
plt.plot(x, self.trajectory)
|
||||||
for i in self.mean:
|
# for i in self.mean:
|
||||||
gaussian = np.exp(-0.5 * (x - i)**2 / self.std**2)
|
# gaussian = np.exp(-0.5 * (x - i)**2 / self.std**2)
|
||||||
plt.plot(x, gaussian)
|
# plt.plot(x, gaussian)
|
||||||
|
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user