MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / sample

Method sample

rl/bayesian_bandit.py:30–31  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28 return np.random.random() < self.p
29
30 def sample(self):
31 return np.random.beta(self.a, self.b)
32
33 def update(self, x):
34 self.a += x

Callers 15

ddpgFunction · 0.45
gym_tutorial.pyFile · 0.45
__init__Method · 0.45
__init__Method · 0.45
sample_actionMethod · 0.45
__init__Method · 0.45
sample_actionMethod · 0.45
__init__Method · 0.45
sample_actionMethod · 0.45
sample_actionMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected