Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ pull
Method
pull
rl/ucb1.py:25–27 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
23
self.N = 0.
# num samples collected so far
24
25
def
pull(self):
26
# draw a 1 with probability p
27
return
np.random.random() < self.p
28
29
def
update(self, x):
30
self.N += 1.
Callers
1
run_experiment
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected