-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest_gp_agent.py
31 lines (23 loc) · 1.07 KB
/
test_gp_agent.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import numpy as np
import functions
from ssp_bayes_opt import BayesianOptimization
# def test_gp_init():
# func, bounds, T = functions.factory('branin-hoo')
# bo = BayesianOptimization(f=func, bounds=bounds)
# agt, init_xs, init_ys = bo.initialize_agent(agent_type='gp')
# print(np.exp(agt.gp.kernel_.theta))
# def test_gp_update():
# func, bounds, T = functions.factory('branin-hoo')
# bo = BayesianOptimization(f=func, bounds=bounds)
# agt, init_xs, init_ys = bo.initialize_agent(agent_type='gp')
# print(np.exp(agt.gp.kernel_.theta))
def test_static_gp_init():
func, bounds, T = functions.factory('branin-hoo')
bo = BayesianOptimization(f=func, bounds=bounds)
agt, init_xs, init_ys = bo.initialize_agent(agent_type='static-gp')
print('lenscale', agt.gp.kernel_.length_scale)
# def test_static_gp_update():
# func, bounds, T = functions.factory('branin-hoo')
# bo = BayesianOptimization(f=func, bounds=bounds)
# agt, init_xs, init_ys = bo.initialize_agent(agent_type='static-gp')
# print(np.exp(agt.gp.kernel_.theta))