Python集成R语言PyThor.zip

时间:2022-08-05 02:45:12
【文件属性】:
文件名称:Python集成R语言PyThor.zip
文件大小:3KB
文件格式:ZIP
更新时间:2022-08-05 02:45:12
开源项目 RPy2 可以在 Python 和 R 之间进行交互,让用户可以在 Python 中轻松的使用 R 的封装包。Python 一般用来进行数据分析,但是许多的包只存在于 R 语言中。所以,在 Python 与 R 中进行互通非常重要。Pythor 包含使用 RPY2 的方法,还可以编写 R 包的封装。线性模型的 R 代码示例:fit <- lm('eruptions ~ waiting', data=faithful_geyser) predicted <- predict(fit, newdata=tail(faithful_geyser))使用 Pythor 之后的 Python 代码:pylm = PYLM() relationship='eruptions~waiting' pylm.fit(relationship, faithful_pandas_df) pylm.predict(faithful_pandas_df.tail(5)) 标签:PyThor
【文件预览】:
pythor-master
----pythor()
--------stl.py(2KB)
--------lm.py(1KB)
----.gitignore(710B)
----README.md(1KB)

网友评论