Can I use directly H2O library functions from Java or the only option for H2O is R?

删除回忆录丶 提交于 2019-12-12 06:41:43

问题


I want to use machine learning algorithms in java. Mahout with hadoop is too slow and weka is not able to work because of large datasize. So is it possible to call H2O library from Java or any other better option available for java?


回答1:


What you can do is implement your machine learning algorithms in R, and then call them via command line calls to the underlying system. I found this to be my best option when doing my thesis in Bioinformatics a few years ago.

I remember trying to call the R engine directly from Java using some kind of Java/R integration-library, but decided it was too slow and cumbersome, so I ended up instead writing simple scripts in R, which Java could call via the command line interface.

The downside of this is that slow processes may be hard to track; you might not get any result from an R-operation until it has completed and returned it's status code.

You'll need to write some Java code to issue the R commands, and wait for the response/result from the process, preferably without locking your Java application completely (separate threads, or a background process).




回答2:


Yes you can. Please see the instructions on the H2O Flow UI pressing the POJO button after Building and Viewing a model. It gives you detailed instructions about how to download your generated model as a java file (POJO) and about how to download the h20 jar file needed to run it. You can get the same instructions pressing the Preview POJO button.



来源:https://stackoverflow.com/questions/33909907/can-i-use-directly-h2o-library-functions-from-java-or-the-only-option-for-h2o-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!