Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, monk12, Quad), 829 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Has anyone used LSTM? #482248
01/16/21 22:41
01/16/21 22:41
Joined: Jan 2021
Posts: 18
London
T
TraderTom Offline OP
Newbie
TraderTom  Offline OP
Newbie
T

Joined: Jan 2021
Posts: 18
London
Hi Everyone,

First time posting on here. I've been working on models for a couple of years, mostly with python, and have recently discovered zorro. The example machine learning scripts for zorro are very good but obviously written in R and C so a little alien to me.

I was wondering if anyone had done anything with LSTM's within zorro? Ideally within the example scripts to see a generic example. Obviously the main difference vs the standard keras example script is the shaping of the input data needs to be an array. Interested to see if anyones done anything with it?

Re: Has anyone used LSTM? [Re: TraderTom] #482307
01/27/21 09:22
01/27/21 09:22
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
An example LSTM structure:

Code
create_model <- function(batchSize) {
  dropout <- 0.3
  model <- keras_model_sequential() 
  model %>%
    layer_lstm(batch_input_shape =  c(batchSize, 1, 27), units = 128, return_sequences = TRUE, stateful = TRUE, dropout = dropout, recurrent_dropout = dropout) %>%
    layer_lstm(units = 64, return_sequences = TRUE, stateful = TRUE, dropout = dropout, recurrent_dropout = dropout) %>%
    layer_lstm(units = 8, return_sequences = FALSE, stateful = TRUE, dropout = dropout, recurrent_dropout = dropout) %>%
    layer_dense(units = 1, activation = 'sigmoid')
}

Re: Has anyone used LSTM? [Re: TraderTom] #482392
02/01/21 12:17
02/01/21 12:17
Joined: Jan 2021
Posts: 18
London
T
TraderTom Offline OP
Newbie
TraderTom  Offline OP
Newbie
T

Joined: Jan 2021
Posts: 18
London
Thanks for your reply.

Sorry, it probably me being very very new to R but I'm struggling to understand how to use this in the context of zorro and R. I tried to create a model by modifying the DeepLearnKeras script as that seems to be the most obvious. It works fine in RStudio but then in zorro just fails at every step. Am I missing something in zorro to increase the verosity to give errors rather than just failing at each step?

Thanks

Tom

Re: Has anyone used LSTM? [Re: TraderTom] #482526
02/18/21 12:46
02/18/21 12:46
Joined: Jan 2021
Posts: 22
Singapore
S
strimp099 Offline
Newbie
strimp099  Offline
Newbie
S

Joined: Jan 2021
Posts: 22
Singapore
I’m also a python dev but the manual has enough to get started. Also note the R script has to have a certain structure for Zorro to know how to call. This might help: https://financial-hacker.com/build-better-strategies-part-5-developing-a-machine-learning-system/

Re: Has anyone used LSTM? [Re: TraderTom] #482536
02/20/21 00:28
02/20/21 00:28
Joined: Jan 2021
Posts: 18
London
T
TraderTom Offline OP
Newbie
TraderTom  Offline OP
Newbie
T

Joined: Jan 2021
Posts: 18
London
This was more to do with data shaping and the way zorro sends data to the neural functions.

Its less about neural networks in R and more about data shaping into 3D inputs for LSTM's.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1