Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ to_bin
Function
to_bin
rl2/cartpole/q_learning_bins.py:29–30 ·
view source on GitHub ↗
(value, bins)
Source
from the content-addressed store, hash-verified
27
return
int(
""
.join(map(
lambda
feature: str(int(feature)), features)))
28
29
def
to_bin(value, bins):
30
return
np.digitize(x=[value], bins=bins)[0]
31
32
33
class
FeatureTransformer:
Callers
1
transform
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected