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

Method predict

rl/linear_rl_trader.py:66–69  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

64 self.losses = []
65
66 def predict(self, X):
67 # make sure X is N x D
68 assert(len(X.shape) == 2)
69 return X.dot(self.W) + self.b
70
71 def sgd(self, X, Y, learning_rate=0.01, momentum=0.9):
72 # make sure X is N x D

Callers 3

sgdMethod · 0.95
actMethod · 0.45
trainMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected