Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Machine Learning by (19k points)

I have a Java app that needs to perform partial least squares regression. It would appear there are no Java implementations of PLSR out there. Weka might have had something like it at some point, but it is no longer in the API. On the other hand, I have found a good R implementation, which has an added bonus to it. It was used by the people whose results I want to replicate, which means there is less chance that things will go wrong because of differences in the way PLSR is implemented.

The question is: is there a good enough (and simple to use) package that enables Java to call R, pass in some parameters to a function and read back the results? My other option is to have Java spawn R in a Process and then monitor it. Data would be read and written to disk. Which of the two would you recommend? Am I missing the obvious third option?

1 Answer

0 votes
by (33.1k points)

There are some tools available for Java-R integration. I have tried two alternatives in the past.

JRI

  • Pros: Probably fine and smooth performance.

  • Cons: You have to configure some environment variables and libraries, different in Win/UNIX.

RServe

  • Pros: Easy to set up, you don't need to initialize R or link against any R library, can run in a different machine.

  • Cons: based on TCP/IP (a server is running), no callbacks from R.

I hope this will also work for you.

If you wish to know more about What is R Programming then visit this R Programming Course.

Browse Categories

...