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

Method _get_obs

tf2.0/rl_trader.py:203–208  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

201
202
203 def _get_obs(self):
204 obs = np.empty(self.state_dim)
205 obs[:self.n_stock] = self.stock_owned
206 obs[self.n_stock:2*self.n_stock] = self.stock_price
207 obs[-1] = self.cash_in_hand
208 return obs
209
210
211

Callers 2

resetMethod · 0.95
stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected