stock-rnn
stock-rnn copied to clipboard
Prediction
Hi, First, thanks for your code and tutorial, it is really interesting! I learned a lot.
Second, I have a question but I feel pretty stupid asking that since I got the impression I m missing the obvious :/ I did train my IA with all the stock_count (100 actually) and I would like to test how it will predict the price of GOOG.
So I did:
# python main.py --stock_symbol=GOOG --input_size=1 --lstm_size=128 --embed_size=8
{'batch_size': 64,
'embed_size': 8,
'init_epoch': 5,
'init_learning_rate': 0.001,
'input_size': 1,
'keep_prob': 0.8,
'learning_rate_decay': 0.99,
'lstm_size': 128,
'max_epoch': 50,
'num_layers': 1,
'num_steps': 30,
'sample_size': 4,
'stock_count': 100,
'stock_symbol': 'GOOG',
'train': False}
2018-02-14 14:47:55.716691: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2018-02-14 14:47:55.716715: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
inputs.shape: (?, 30, 1)
inputs_with_embed.shape: (?, 30, 9)
/home/mike/anaconda3/envs/IA/lib/python2.7/site-packages/tensorflow/python/ops/gradients_impl.py:95: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
---------
Variables: name (type shape) [size]
---------
embed_matrix:0 (float32_ref 100x8) [800, bytes: 3200]
dynamic_rnn/lstm_cell/kernel:0 (float32_ref 137x512) [70144, bytes: 280576]
dynamic_rnn/lstm_cell/bias:0 (float32_ref 512) [512, bytes: 2048]
w:0 (float32_ref 128x1) [128, bytes: 512]
b:0 (float32_ref 1) [1, bytes: 4]
Total size of variables: 71585
Total bytes of variables: 286340
[*] Reading checkpoints...
[*] Success to read stock_rnn_lstm128_step30_input1_embed8.model-218450
So it's working, but where can I get the prediction? It is writing no images and printing nothing.
Thanks again for you help, I have some idea of improvement for the project but I m stuck at this point :(
Best
Did you try use train like this: python main.py --stock_symbol=GOOG --train --input_size=1 --lstm_size=128 --max_epoch=50
then take a look at images folder? It will be nice if we can improve the results in prediction.
I don't see prediction in the images folder. I you tell me where to look?