Hello, I am running a deep neural network in Python. The input to the NN is the output from my R code. I am currently running the python script and calling the R code using a subprocess call, but this does not allow me to recursively change (increment) parameters used in the R code that would be the inputs to the python code. So in short, I would like to follow this automated process: 1. Parameters used in R code generate output 2. This output is input to Python code 3. If output of Python code > x, stop 4. Else, increment parameters used as input in R code (step 1) and repeat all steps I have searched for examples using R and Python together, and rpy2 seems like the way to go, but is there another (easier) way to do it? I would highly appreciate the help. Thanks in advance, Kankana [[alternative HTML version deleted]]
How about pyper? On Thu, Mar 30, 2017 at 10:42 PM Kankana Shukla <shukla.kank at gmail.com> wrote:> Hello, > > I am running a deep neural network in Python. The input to the NN is the > output from my R code. I am currently running the python script and calling > the R code using a subprocess call, but this does not allow me to > recursively change (increment) parameters used in the R code that would be > the inputs to the python code. So in short, I would like to follow this > automated process: > > 1. Parameters used in R code generate output > 2. This output is input to Python code > 3. If output of Python code > x, stop > 4. Else, increment parameters used as input in R code (step 1) and > repeat all steps > > I have searched for examples using R and Python together, and rpy2 seems > like the way to go, but is there another (easier) way to do it? I would > highly appreciate the help. > > Thanks in advance, > > Kankana > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
'Snakemake' (https://snakemake.readthedocs.io/en/stable/) was created to ease pipelines through different tools so it might be useful. In all honesty I only know of Snakemake, so it might be the completely wrong horse. HTH Ulrik On Fri, 31 Mar 2017 at 06:01 Wensui Liu <liuwensui at gmail.com> wrote:> How about pyper? > > On Thu, Mar 30, 2017 at 10:42 PM Kankana Shukla <shukla.kank at gmail.com> > wrote: > > > Hello, > > > > I am running a deep neural network in Python. The input to the NN is the > > output from my R code. I am currently running the python script and > calling > > the R code using a subprocess call, but this does not allow me to > > recursively change (increment) parameters used in the R code that would > be > > the inputs to the python code. So in short, I would like to follow this > > automated process: > > > > 1. Parameters used in R code generate output > > 2. This output is input to Python code > > 3. If output of Python code > x, stop > > 4. Else, increment parameters used as input in R code (step 1) and > > repeat all steps > > > > I have searched for examples using R and Python together, and rpy2 seems > > like the way to go, but is there another (easier) way to do it? I would > > highly appreciate the help. > > > > Thanks in advance, > > > > Kankana > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
> On 30 Mar 2017, at 23:37, Kankana Shukla <shukla.kank at gmail.com> wrote: > > I have searched for examples using R and Python together, and rpy2 seems > like the way to go, but is there another (easier) way to do it?Rpy2 would seem to be a very easy and convenient solution. What do you need that can't easily be down with rpy2? Best regards, Stefan
I'm not great at rpy2. Are there any good examples I could see to learn how to do that? My R code is very long and complicated. On Fri, Mar 31, 2017 at 7:08 AM, Stefan Evert <stefanML at collocations.de> wrote:> > > On 30 Mar 2017, at 23:37, Kankana Shukla <shukla.kank at gmail.com> wrote: > > > > I have searched for examples using R and Python together, and rpy2 seems > > like the way to go, but is there another (easier) way to do it? > > Rpy2 would seem to be a very easy and convenient solution. What do you > need that can't easily be down with rpy2? > > Best regards, > Stefan[[alternative HTML version deleted]]