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

Method predict

rl2/mountaincar/q_learning.py:76–80  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

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

Callers 3

sample_actionMethod · 0.95
play_oneFunction · 0.45
plot_cost_to_goFunction · 0.45

Calls 1

transformMethod · 0.45

Tested by

no test coverage detected