-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nan in summary histogram for: q_network/avg_q_summary/q/2 #13
Comments
I believe you are using |
@samre12 I found the problem. It's the dataset, all the data has to have a non zero decimal. The only thing I did was to add a random number between 0 and 1 (both not included) to every price and volume entry and now it works.
|
@cTatu I don't know how would a zero decimal value affect the model. Did you try running the model on different data points with zero decimal values? |
Actually many a times I also have the same error while running the code on my dataset as well. But I do not always get the error due to random selection of the episode. @cTatu do you have an idea about what could be the probable cause? |
I tried also with another dataset (EUR/USD) and gives the same error even with the workaround that I've mention early. In this dataset all the prices fluctuates betweetn 1.2 and 1.8 so the only idea that I have is that it may be due to little differences in values between episodes. Maybe that is causing a very small chage which is interpreted as 'not learning'. I didn't have enough time to look all the model's code, what I said is my very basic and general idea, I'm still have no idea what is going on. It's the first time that I see a model which is not learning because dataset fault. The only thing that I see weird ( a little bit off topic) is that the agent choose random episodes from the dataset. I mean, the price of an asset is a time series structure, and every entry on the dataset is influeced by the past prices due to fractal laws and Elliott Wave Theory. So if the episodes are choosen randomly, how would the model be able to sustain a real-time trading system? Furthermore, I think that if agent's actions are determined by his historical 'experience' and all that episodes are randomly mixed then he only would have a very restricted point of view of the whole market or timeline. All the market prediction/trading models that I saw used a LSTM which is the most suitable for the time-series problems. This is a new approach for me, I will search more details about it on the Deep Q-Trading. |
i@cTatu I am sorry for the initial vague description. The aim is to train the agent to look at limited number of historical prices and base its decisions of trading upon it. By random episode, I mean a random starting point in the time series along with the historical prices prior to the starting point. |
Same bug... I tried changing the scale to 10000,1000, 5000, 30000 same thing. This is using the DEV version. |
@SdxHex thanks for pointing that out but I am aware of the bug in the |
Thanks I made a couple of changes to the way the data is pulled seems to be working great! I think I read that you are not accepting pull requests? Thanks for putting this together. |
@SdxHex I am very open to accept pull requests 😄 ! Where did you read that I am not accepting 😛? It would be highly appreciated if you raise one as I am currently spending more time towards how to incorporate more technical indicators in the input and normalise them before feeding into the network. |
Hi,
I tried using another datasets, one with a forex pair and another one with the BTC/USD pair but it gives me that error for every dataset. With the original dataset (btc.csv) this error doesn't happen, and the other ones has the same exact column names and data types. The only thing I did was changing the config file to take this new dataset.
Here's a look of my custom BTC dataset.
Also, the people on the internet say that I should decrease the learning rate, so I did, but the problem persist. I also tried messing around with the parameters from
model/baseagent.py
but same.I ask here because I tried everything, including changing the order of the colums in the dataset.
Thank you!
The text was updated successfully, but these errors were encountered: