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

Method __init__

rl/approx_control.py:58–67  ·  view source on GitHub ↗
(self, grid)

Source from the content-addressed store, hash-verified

56
57class Model:
58 def __init__(self, grid):
59 # fit the featurizer to data
60 samples = gather_samples(grid)
61 # self.featurizer = Nystroem()
62 self.featurizer = RBFSampler()
63 self.featurizer.fit(samples)
64 dims = self.featurizer.n_components
65
66 # initialize linear model weights
67 self.w = np.zeros(dims)
68
69 def predict(self, s, a):
70 sa = merge_state_action(s, a)

Callers

nothing calls this directly

Calls 2

gather_samplesFunction · 0.70
fitMethod · 0.45

Tested by

no test coverage detected