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

Method predict

rl2/mountaincar/td_lambda.py:56–61  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

54 self.models.append(model)
55
56 def predict(self, s):
57 X = self.feature_transformer.transform([s])
58 assert(len(X.shape) == 2)
59 result = np.stack([m.predict(X) for m in self.models]).T
60 assert(len(result.shape) == 2)
61 return result
62
63 def update(self, s, a, G, gamma, lambda_):
64 X = self.feature_transformer.transform([s])

Callers 2

sample_actionMethod · 0.95
play_oneFunction · 0.45

Calls 1

transformMethod · 0.45

Tested by

no test coverage detected