我可以直接使用Java的H2O库函数,还是H2O的唯一选择是R? [英] Can I use directly H2O library functions from Java or the only option for H2O is R?

查看:215
本文介绍了我可以直接使用Java的H2O库函数,还是H2O的唯一选择是R?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Java中使用机器学习算法.带有hadoop的Mahout太慢,并且weka由于大数据量而无法工作. 那么是否可以从Java或其他可用的Java更好的选项中调用H2O库?

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?

推荐答案

您可以做的是在R中实现您的机器学习算法,然后通过对底层系统的命令行调用来调用它们.几年前,我在做生物信息学论文时发现这是我最好的选择.

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.

我记得曾经尝试使用某种Java/R集成库直接从Java调用R引擎,但是我认为它太慢且麻烦,所以我最终还是用R编写了简单的脚本,Java可以通过R来调用命令行界面.

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.

其缺点是缓慢的过程可能难以跟踪;在R作业完成并返回其状态代码之前,您可能不会从R作业中得到任何结果.

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.

您将需要编写一些Java代码来发出R命令,并等待进程的响应/结果,最好不要完全锁定Java应用程序(单独的线程或后台进程).

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).

这篇关于我可以直接使用Java的H2O库函数,还是H2O的唯一选择是R?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆