Experiment emulators

[1]:
import numpy as np

from olympus import Emulator
from olympus import list_trained_emulators
[2]:
# checking trained emulators
print(list_trained_emulators())
['wf3_NeuralNet', 'hplc_BayesNeuralNet', 'snar_BayesNeuralNet', 'n9_NeuralNet', 'hplc_NeuralNet', 'suzuki_BayesNeuralNet', 'bob_NeuralNet', 'pce10_BayesNeuralNet', 'fullerenes_BayesNeuralNet', 'alkox_NeuralNet', 'benzylation_NeuralNet', 'fullerenes_NeuralNet', 'alkox_BayesNeuralNet', 'snar_NeuralNet', 'n9_BayesNeuralNet', 'suzuki_NeuralNet', 'benzylation_BayesNeuralNet', 'pce10_NeuralNet', 'bob_BayesNeuralNet', 'wf3_BayesNeuralNet']

Here we will use alkox_BayesNeuralNet

[3]:
# initialize emulator
emulator = Emulator(dataset='alkox', model='BayesNeuralNet')
[INFO] Loading emulator using a BayesNeuralNet model for the dataset alkox...

[4]:
# print emulator information
print(emulator)
<Emulator (Dataset(kind=alkox), model=
--> batch_size:    50
--> es_patience:   100
--> hidden_act:    leaky_relu
--> hidden_depth:  3
--> hidden_nodes:  96
--> kind:          BayesNeuralNet
--> learning_rate: 0.001
--> max_epochs:    100000
--> out_act:       relu
--> pred_int:      100
--> reg:           0.01
--> scope:         model)>
[24]:
# check on goal
print(emulator.get_goal())
maximize
[25]:
# run single prediction
params = np.zeros(4)
values = emulator.run(params)
print(values)
[[56.3565859]]
[30]:
# run multiple predictions
params = [np.zeros(4) + 0.0,
          np.zeros(4) + 0.5,
          np.zeros(4) + 1.0]
values = emulator.run(params, num_samples = 5)
print(values)
[[47.04858576]
 [35.74277879]
 [20.47608956]]
[ ]:

[ ]: