kkuette / TradzQAI

Trading environnement for RL agents, backtesting and training.
Apache License 2.0
164 stars 47 forks source link

Performing training automatically evaluates the model. #9

Closed oscarberonius closed 5 years ago

oscarberonius commented 5 years ago

So I have a little trouble understanding how the training/evaluation works.

If I run 'python run.py -m train', a log file "traindate.txt" is created with the resulting award in /save/agent#. Likewise a log file "eval_date.txt" is created when I run the evaluation command.

I can run the eval command and get results even without running the training command first. The results of the evaluation seem to be the same regardless of how many times the evaluation is run, but the results of the training differ every time.

Can you explain what the difference is and what data is being used to evaluate the model? To me it seems like both commands train a model on all the provided data and then evaluate on parts of that same data, but I can't figure out what really is happening.

kkuette commented 5 years ago

Hi,

The eval mode, run 1 episode, and set the deterministic flag for the act function to True. It will not apply exploration after actions are calculated. Before an eval run, you can change dataset to see if your model didn't overfit on your current dataset.

I hope it help.