python rpy2 setseed_pythor: RPy2 可以在 Python 和 R 之间进行交互,让用户可以在 Python 中轻松的使用 R 的封装包...

PyThor- Python meets R

Python is fanstastc! So, is R. R contains so many awesome packages that aren't available in Python. Can we get the best of both the worlds? This repository contains recipes for using RPY2 and writing your own wrapper around R packages, so that you can use them conveniently within your Python environment. Read the introductory blog post here.

Here is a sample R code you'd write for fitting a linear model.

fit

predicted

Here is the Python code you'll now have to write with the Pythor recipe in place.

pylm = PYLM()

relationship='eruptions~waiting'

pylm.fit(relationship, faithful_pandas_df)

pylm.predict(faithful_pandas_df.tail(5))

As simple as it gets. Obviously, there are many awesome packages in Python which provide linear fitting methods. But, this was just an illustration.

Current list of R packages interfaced (maybe partially) in PyThor

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值