MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / predict

Method predict

rl2/cartpole/q_learning.py:78–81  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

76 self.models.append(model)
77
78 def predict(self, s):
79 X = self.feature_transformer.transform(np.atleast_2d(s))
80 result = np.stack([m.predict(X) for m in self.models]).T
81 return result
82
83 def update(self, s, a, G):
84 X = self.feature_transformer.transform(np.atleast_2d(s))

Callers 2

sample_actionMethod · 0.95
play_oneFunction · 0.45

Calls 1

transformMethod · 0.45

Tested by

no test coverage detected