How to use the python bridge for a machine learning strategy

Posted By: JamesHH

How to use the python bridge for a machine learning strategy - 03/15/20 03:03

From the manual: "You can use [Train] mode and WFO for training Python machine learning algorithms, f.i. a SVM or neural network. For this, send training data to Python at the end of every WFO cycle, and store the trained models in files for later use in the [Test] or [Trade] session, similar to the neural function for R. A neural function for Python will be provided in a future Zorro version. "

I am trying to understand the best way to send the training data to Python at the end of the training period.

Would I append the signals for each bar to some file on every loop of run()? Or is there some way obtain the entire signals data set over the entire training run to be passed on to Python?
Posted By: jcl

Re: How to use the python bridge for a machine learning strategy - 03/16/20 08:49

You normally train the entire data set at the end of any wfo cycle. Check out the neural function in r.h - you'll need the same function, only calling Python code instead of R code.
Posted By: JamesHH

Re: How to use the python bridge for a machine learning strategy - 03/16/20 23:19

So I write my own function neural, if I understand. Makes sense.
Posted By: Smon

Re: How to use the python bridge for a machine learning strategy - 04/03/20 10:29

I thought using python for deep learning isn't possible yet, because all python machine learning packages are 64bit only and there is no python64bit bridge yet..???
Posted By: JamesHH

Re: How to use the python bridge for a machine learning strategy - 04/06/20 03:21

Originally Posted by sdh309795gaas
I thought using python for deep learning isn't possible yet, because all python machine learning packages are 64bit only and there is no python64bit bridge yet..???


I never heard that, and I have installed tensorflow on my 32-bit python installation.
Posted By: JamesHH

Re: How to use the python bridge for a machine learning strategy - 04/25/20 22:49

Originally Posted by Smon
I thought using python for deep learning isn't possible yet, because all python machine learning packages are 64bit only and there is no python64bit bridge yet..???


It looks like you were correct.

I was using python from the R bridge. I assumed it was 32-bit, but I must have been mistaken. I wish someone had corrected me.

So we can only use 64-bit python with Zorro through the R-bridge?? That seems ridiculous. I will have to check the forum for discussion on the python bridge.
Posted By: JamesHH

Re: How to use the python bridge for a machine learning strategy - 04/25/20 23:00

Originally Posted by JamesHH

It looks like you were correct.

I was using python from the R bridge. I assumed it was 32-bit, but I must have been mistaken. I wish someone had corrected me.

So we can only use 64-bit python with Zorro through the R-bridge?? That seems ridiculous. I will have to check the forum for discussion on the python bridge.


Here is the relevant thread: [url=https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=477133]#477134
© 2024 lite-C Forums