用于 Rails 应用程序的 R 统计包 Gem [英] R Statistical Package Gem For A Rails Application

查看:23
本文介绍了用于 Rails 应用程序的 R 统计包 Gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望将 R 统计包集成到我的 Rails 应用程序中.我的研究发现了 RSRuby、RinRuby 和 Rserve Ruby 客户端.如果能从使用过这些或其他选项的人那里得到一些反馈,并更好地了解每个选项的优缺点,那就太好了.我也听说 Gauss 是一种替代方法,但目前我不知道有任何 ruby​​ 接口.

I'm looking to integrate the R Statistical package into my rails application. My research has uncovered RSRuby, RinRuby and the Rserve Ruby client. It would be great to get some feedback from those of you who have you used these or other options and to get a better ideas of the pluses and minuses of each option. I have also heard Gauss is an alternative, but I am not aware of any ruby interfaces at this point.

我的主要应用是多项 logit 和 probit 模型.如果有帮助的话.

My primary applications will be multinomial logit and probit models. If that's helpful.

预先感谢您的意见.

推荐答案

RSRuby 采用将 R 解释器作为 C 扩展嵌入到 Ruby 中的方法.它仅适用于特定版本的 ruby​​,因此如果您使用的是 JRuby 或 Rubinius,这不是您真正的选择.这绝对是最快的,虽然有些类转换有点奇怪.

RSRuby takes the approach of embedding the R interpreter into Ruby as a C extension. It only works on specific versions of ruby, so if you are using JRuby or Rubinius this is not really an option for you. It is definitely the fastest, although some class conversions get a little weird.

RinRuby 和 Rserve Ruby 都使用 TCP/IP 套接字,尽管 Rserve 声称要快 5-10 倍.

RinRuby and Rserve Ruby both use TCP/IP sockets, although Rserve claims to be 5-10 times faster.

我会尝试一下 RSRuby,如果您遇到 ruby​​ 版本等问题,请切换到 Rserve.我不熟悉高斯.

I would giving RSRuby a try, and if you encounter problems with your ruby version or such, switching to Rserve. I am not familiar with Gauss.

请注意——据我所知,这些解决方案都不支持多线程,主要是因为 R 与自身的其他实例不兼容.

Heads up- as far as I know, none of these solutions support multi threading, largely because R doesn't play nice with other instances of itself.

这篇关于用于 Rails 应用程序的 R 统计包 Gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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