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
Where can you check wich ml file is advice function reading? #479985
05/11/20 10:35
05/11/20 10:35
Joined: Feb 2018
Posts: 68
T
tomaslolo Offline OP
Junior Member
tomaslolo  Offline OP
Junior Member
T

Joined: Feb 2018
Posts: 68
Hello, I´ve been sometimes developing with advice function, try things, go to other things and come back.

I get strange behaviours and I have the doubt about which file does advice function read, when testing/trading, a trained strategy.

As far as I know, it reads "Deeplearn.ml" files but how can i make sure it´s reading the correct .ml file?

For example this R code, from the R script:

neural.test = function()
{
neural.init()
XY <<- read.csv('c'c:/project/Zorro/Data/DeepLearn.csv' ,header = F)
splits <- nrow(XY)*0.8
XY.tr <<- head(XY,splits)
XY.ts <<- tail(XY,-splits)
neural.train(1,XY.tr)

X <<- XY.ts[,-ncol(XY.ts)]
Y <<- XY.ts[,ncol(XY.ts)]
Y.ob <<- ifelse(Y > 0,1,0)
Y.pr <<- neural.predict(1,X)
confusionMatrix(as.factor(Y.pr),as.factor(Y.ob))
}

Is neural.test function called by zorro when testing and you have to change Deeplearn.csv path? Deeplearn.csv file should be Deeplearn.ml? Or does Zorro reads .ml file without using R?

Thank you in advanced!

Re: Where can you check wich ml file is advice function reading? [Re: tomaslolo] #480046
05/15/20 21:59
05/15/20 21:59
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
Pretty old, but as far I see, first the neural net needs to be trained to the price curve.

Therefore this must be changed to the features file.
XY <<- read.csv('c'c:/project/Zorro/Data/DeepLearn.csv' ,header = F)

After training the neurons, the Zorro script needs to be trained and creates the .ml files.

Zorro handels which .ml files are read.

Just the scripts .r and .c need the same name.

I suggest both sources of knowledge for beginners:

https://financial-hacker.com/build-better-strategies-part-5-developing-a-machine-learning-system/
https://robotwealth.com/machine-learning-financial-prediction-david-aronson/

Re: Where can you check wich ml file is advice function reading? [Re: tomaslolo] #480061
05/17/20 21:01
05/17/20 21:01
Joined: Feb 2018
Posts: 68
T
tomaslolo Offline OP
Junior Member
tomaslolo  Offline OP
Junior Member
T

Joined: Feb 2018
Posts: 68
Thank you for your reply. I´ve red some about it, I´ll re-read them and robotwealth one.

I make sure both files (.c and .r) have the same name, but I get results I don´t understand and ask myself if I can make sure which ml file is Zorro reading.


Thanks again!

Re: Where can you check wich ml file is advice function reading? [Re: tomaslolo] #480132
05/21/20 17:44
05/21/20 17:44
Joined: Dec 2014
Posts: 204
Germany
Smon Offline
Member
Smon  Offline
Member

Joined: Dec 2014
Posts: 204
Germany
You should use DebugViewDebugView to see what Zorro is actually sending to the R session.

Another cool trick is to put this file at the beginning of the R script:

Code
neuraldebugpath <- paste0("D:/Zorro/Strategy/neural_debug.rda")


Just edit the path according to your needs.

End then you put this

Code
save.image(neuraldebugpath)


right at the beginning of your neural.train function in the R script.

Then you can use RStudio to see what's really going on under the hood. You just need to learn about the <- and the <<- operator and global / local variables in R.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1