Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 831 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Explain R Bridge #453032
07/05/15 18:51
07/05/15 18:51
Joined: Jan 2013
Posts: 68
I
ibra Offline OP
Junior Member
ibra  Offline OP
Junior Member
I

Joined: Jan 2013
Posts: 68
Hi!

So I just updated to the latest version of Zorro. And as usual, I went to the manual to read about the new features that came with 1.32.

The new R Bridge seems like a big step for Zorro. The manual says the following thing about it:

Quote:

- It is the global standard for data analysis and machine learning algorithms.
- It is interactive and easy to use once you're familiar with its command syntax. R functions are short and effective.
- It has ready-to-use extensions - "packages" - for all imaginable tasks, including support vector machines, genetic optimization, several kinds of neural networks, and deep learning algorithms.
- It is continuously developed and supported by the global scientific community. The time between the publication of an idea and its implementation in a R package is usually very short.
- It is free. As Linus Torvalds said: "Software is like sex - it's better when it's free".



Is R Bridge like a whole different language which we get access to via the R Bridge?

For example - are one able to make a simple moving average crossover system with R Bridge?

Compared to the tools, for example spectral filters, that comes with Zorro - are the tools that comes with R Bridge completely different?

Will potential functions to Zorro be lessed focused on from now on?

Re: Explain R Bridge [Re: ibra] #453042
07/06/15 01:26
07/06/15 01:26
Joined: Nov 2013
Posts: 123
Mithrandir77 Offline
Member
Mithrandir77  Offline
Member

Joined: Nov 2013
Posts: 123
R Bridge is an interface (but notice that not in the sense of an interface in object oriented programming) to the R language. You use Rset functions to pass values to R variables (in R variables can be created on the fly) and Rx to execute the R code passed as argument.

Re: Explain R Bridge [Re: Mithrandir77] #453216
07/12/15 13:43
07/12/15 13:43
Joined: Jan 2013
Posts: 68
I
ibra Offline OP
Junior Member
ibra  Offline OP
Junior Member
I

Joined: Jan 2013
Posts: 68
Originally Posted By: Mithrandir77
R Bridge is an interface (but notice that not in the sense of an interface in object oriented programming) to the R language. You use Rset functions to pass values to R variables (in R variables can be created on the fly) and Rx to execute the R code passed as argument.


Hi!

Thanks for answering.

I'm afraid I'm not sure I understand, no offence.

Is the R language being used to code completely different strategies with different indicators than the ones that come with Zorro?

What can we do with R that we can't do with Zorro?

Re: Explain R Bridge [Re: ibra] #453226
07/12/15 19:46
07/12/15 19:46
Joined: Nov 2013
Posts: 123
Mithrandir77 Offline
Member
Mithrandir77  Offline
Member

Joined: Nov 2013
Posts: 123
No problem, I myself coming from an IT background find it difficult to understand some concepts of Zorro. I will proceed to answer your questions in between quotes and later I add some more info, remember also that jcl said that they will set up an R bridge tutorial soon

Originally Posted By: ibra

Is R Bridge like a whole different language which we get access to via the R Bridge?


Yes, R is an -interpreted- programming language like MatLab or Octave which is focused in scientific problems

Originally Posted By: ibra

For example - are one able to make a simple moving average crossover system with R Bridge?


Yes, you can do almost anything with R, with less work or more work than in other languages. I, for instance, would not implement a moving average crossover strategy in R since Zorro already provides a simple way to do it. Unless I want to do something very specific with the moving average strategy that Zorro can't...

Originally Posted By: ibra

Compared to the tools, for example spectral filters, that comes with Zorro - are the tools that comes with R Bridge completely different?


As said before you can do almost anything with any programming language, the thing with R is that it has a lots of packages ie libraries developed that tackle lots of problems like machine learning and also it brings native support to efficiently perform operations on data like vectors, for instance if you want to multiply the vectors theta and x in Octave (it's the same in R):

Quote:

Unvectorized implementation:
double prediction = 0.0;
for (int j = 0; j < n; j++)
prediction += theta[j] * x[y];

Vectorized implementation:
double prediction
= theta.transpose() * x;


The Vectorized implementation is more efficient. I took that from this course which I did and recommend laugh , there is going to be another edition soon.

Code:
https://class.coursera.org/ml-005/lecture/30
https://class.coursera.org/ml-005/lecture/preview



Originally Posted By: ibra

Will potential functions to Zorro be lessed focused on from now on?


This I don't know. Will leave that to jcl and the Zorro team. But I hope Zorro functions are still maintained and more functions to develop strategies free of bias are added.

Originally Posted By: ibra

Is the R language being used to code completely different strategies with different indicators than the ones that come with Zorro?


Well, as said before, R is more appropriate ie less time consuming to develop strategies which use machine learning algorithms.

Originally Posted By: ibra

What can we do with R that we can't do with Zorro?


An example would be using a neural network with a hidden layer of more than one neuron. You would use one neural network package of R (or even from a dll of the C/C++ language like dlib, libSVM and many more:
Click to reveal..

Code:
http://stackoverflow.com/questions/3167024/fastest-general-machine-learning-library
http://daoudclarke.github.io/machine%20learning%20in%20practice/2013/10/08/machine-learning-libraries/


)
and call it in adviseLong/Short using NEURAL method.

In Zorro as of today, you can only use a PERCEPTRON which is a neural network with only one neuron. (And as I recall, jcl told me in a post that it is trained without using gradient descent so inputs don't need to be normalized).

Here is some more explanation: You can code anything you want in any language, export it to a dll and call it from Zorro. Problem is, it is rather difficult/time consuming to do all the coding your own. As said before R is a language with a large community of developers of machine learning and statistics packages. Check for instance these links:

Code:
https://beckmw.wordpress.com/2013/11/14/visualizing-neural-networks-in-r-update/
http://cran.r-project.org/web/packages/nnet/
http://cran.r-project.org/web/packages/neuralnet/



And this one for another course in programming with R:

Code:
https://www.coursera.org/course/rprog



Feel free to ask if there is something that you don't understand. I also am looking forward for a tutorial or example of an strategy using the R bridge.

Re: Explain R Bridge [Re: Mithrandir77] #453402
07/24/15 17:39
07/24/15 17:39
Joined: Jan 2013
Posts: 68
I
ibra Offline OP
Junior Member
ibra  Offline OP
Junior Member
I

Joined: Jan 2013
Posts: 68
Originally Posted By: Mithrandir77
No problem, I myself coming from an IT background find it difficult to understand some concepts of Zorro. I will proceed to answer your questions in between quotes and later I add some more info, remember also that jcl said that they will set up an R bridge tutorial soon

Originally Posted By: ibra

Is R Bridge like a whole different language which we get access to via the R Bridge?


Yes, R is an -interpreted- programming language like MatLab or Octave which is focused in scientific problems

Originally Posted By: ibra

For example - are one able to make a simple moving average crossover system with R Bridge?


Yes, you can do almost anything with R, with less work or more work than in other languages. I, for instance, would not implement a moving average crossover strategy in R since Zorro already provides a simple way to do it. Unless I want to do something very specific with the moving average strategy that Zorro can't...

Originally Posted By: ibra

Compared to the tools, for example spectral filters, that comes with Zorro - are the tools that comes with R Bridge completely different?


As said before you can do almost anything with any programming language, the thing with R is that it has a lots of packages ie libraries developed that tackle lots of problems like machine learning and also it brings native support to efficiently perform operations on data like vectors, for instance if you want to multiply the vectors theta and x in Octave (it's the same in R):

Quote:

Unvectorized implementation:
double prediction = 0.0;
for (int j = 0; j < n; j++)
prediction += theta[j] * x[y];

Vectorized implementation:
double prediction
= theta.transpose() * x;


The Vectorized implementation is more efficient. I took that from this course which I did and recommend laugh , there is going to be another edition soon.

Code:
https://class.coursera.org/ml-005/lecture/30
https://class.coursera.org/ml-005/lecture/preview



Originally Posted By: ibra

Will potential functions to Zorro be lessed focused on from now on?


This I don't know. Will leave that to jcl and the Zorro team. But I hope Zorro functions are still maintained and more functions to develop strategies free of bias are added.

Originally Posted By: ibra

Is the R language being used to code completely different strategies with different indicators than the ones that come with Zorro?


Well, as said before, R is more appropriate ie less time consuming to develop strategies which use machine learning algorithms.

Originally Posted By: ibra

What can we do with R that we can't do with Zorro?


An example would be using a neural network with a hidden layer of more than one neuron. You would use one neural network package of R (or even from a dll of the C/C++ language like dlib, libSVM and many more:
Click to reveal..

Code:
http://stackoverflow.com/questions/3167024/fastest-general-machine-learning-library
http://daoudclarke.github.io/machine%20learning%20in%20practice/2013/10/08/machine-learning-libraries/


)
and call it in adviseLong/Short using NEURAL method.

In Zorro as of today, you can only use a PERCEPTRON which is a neural network with only one neuron. (And as I recall, jcl told me in a post that it is trained without using gradient descent so inputs don't need to be normalized).

Here is some more explanation: You can code anything you want in any language, export it to a dll and call it from Zorro. Problem is, it is rather difficult/time consuming to do all the coding your own. As said before R is a language with a large community of developers of machine learning and statistics packages. Check for instance these links:

Code:
https://beckmw.wordpress.com/2013/11/14/visualizing-neural-networks-in-r-update/
http://cran.r-project.org/web/packages/nnet/
http://cran.r-project.org/web/packages/neuralnet/



And this one for another course in programming with R:

Code:
https://www.coursera.org/course/rprog



Feel free to ask if there is something that you don't understand. I also am looking forward for a tutorial or example of an strategy using the R bridge.


Thank you for taking the time answering my posts!

Yes, indeed, it would be great with a tutorial. I think it's must'have for me to get started with R laugh.

Have a good weekend.

Re: Explain R Bridge [Re: ibra] #453923
08/19/15 03:14
08/19/15 03:14
Joined: Nov 2013
Posts: 123
Mithrandir77 Offline
Member
Mithrandir77  Offline
Member

Joined: Nov 2013
Posts: 123


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