machine-learning-for-trading
machine-learning-for-trading copied to clipboard
04_q_learning_for_trading -> Error during Observation Space creation
Describe the bug The creation of a Box in trading_env.py:242 is failung. The Datatype of the parameters is not correct. It has to be an nd_array.
Steps to reproduce the behavior:
- OPen 04_q_learning_for_trading
- Execute all
Expected behavior No error occurs
Screenshots

Environment jupyter/datascience-notebook:latest
Solution: self.observation_space = spaces.Box(self.data_source.min_values.to_numpy(), self.data_source.max_values.to_numpy())
Describe the bug The creation of a Box in trading_env.py:242 is failung. The Datatype of the parameters is not correct. It has to be an nd_array.
Steps to reproduce the behavior:
1. OPen 04_q_learning_for_trading 2. Execute allExpected behavior No error occurs
Screenshots
Environment jupyter/datascience-notebook:latest
Solution: self.observation_space = spaces.Box(self.data_source.min_values.to_numpy(), self.data_source.max_values.to_numpy())
A million thanks! I was getting the same error and this worked :)