Kam is the realest MVP when it comes to Bayesian learning design. I am but a humble learner who translated his code into Python
Set working directory to be the parent directory of this notebook
In [ ]:
%matplotlib inline
import os
working_directory = os.path.pardir
import sys
sys.path.insert(0, working_directory)
import matplotlib.pyplot as plt
import numpy as np
import logging
In [ ]:
import t1_simulator
In [ ]:
plt.plot(t1_simulator.T1_VALUES, t1_simulator.WEIGHTS[99, :])
In [ ]:
for weight in range(t1_simulator.WEIGHTS.shape[1]):
print("iteration: %3d Mean: %6.4f Standard Deviation: %6.4f" % (
weight,
(t1_simulator.T1_VALUES * t1_simulator.WEIGHTS[weight,:]).mean(),
(t1_simulator.T1_VALUES *t1_simulator.WEIGHTS[weight,:]).std()
)
)
In [ ]:
t1_simulator.T1_VALUES * t1_simulator.WEIGHTS[weight,:]
In [ ]: