分页: 2 / 3

#21 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 12:51
wokao
我原来用R
现在用julia
即便统计函数,julia足够了

python有的流行package
就是julia写的
fieldman 写了: 2024年 5月 5日 08:26 R多年前风头很旺,大有把业界大佬SAS挤垮的趋势,据说现在要被巨蟒搞定了?

#22 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 13:07
fieldman
教授用什么放在一边,我更感兴趣的是业界比较大规模的,成熟的application用什么, 那些可能不需要非常新的算法。

可以直接把R放在HPC上用,也可以用python, 甚至更低级的语言,反正实现一个较通用的algorithm也不是什么门槛很高的东西。

hci 写了: 2024年 5月 5日 11:14 搞不定。

R在统计学中的地位,还不能被撼動,主要是统计学教授只用R,相关的学科,也是如此。比如心理系的研究生们,大都会R。

会R,python就也会了,反之不然。

#23 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 13:19
fieldman
天哪,这又产生了 julia和python的选择问题了!
wokao 写了: 2024年 5月 5日 12:51 我原来用R
现在用julia
即便统计函数,julia足够了

python有的流行package
就是julia写的

#24 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 13:34
wokao
python适合machine learning

统计分析三个差不了多少,R多一些,对我都够用了

语言本身,r的大括弧和python的缩进让人不舒服



fieldman 写了: 2024年 5月 5日 13:19 天哪,这又产生了 julia和python的选择问题了!

#25 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 13:37
tongmeng
fieldman 写了: 2024年 5月 5日 08:26 R多年前风头很旺,大有把业界大佬SAS挤垮的趋势,据说现在要被巨蟒搞定了?
我现在不再用SAS了

#26 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 14:10
pseudo
fieldman 写了: 2024年 5月 5日 08:26 R多年前风头很旺,大有把业界大佬SAS挤垮的趋势,据说现在要被巨蟒搞定了?
个人而言,更喜欢R:主要是喜欢 bigtable 胜过 python 的 pandas。经常吐槽 pandas,太难用了。

希望科学计算这块将来会统一到 Julia。对了,Julia 的内核本质也是 Lisp。

#27 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 14:11
VladPutin
这俩都不是一种东西怎么比较?

#28 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 14:15
pseudo
fieldman 写了: 2024年 5月 5日 08:26 R多年前风头很旺,大有把业界大佬SAS挤垮的趋势,据说现在要被巨蟒搞定了?
说实在的,大公司就应该用 SAS,丑是丑一点,但非常适合不是统计专业的人使用,稳定而且提供的选项多。

折腾 Python 就是搞笑,把搞数据分析的人逼成 IT 砖家干嘛?

#29 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 14:47
wokao
用duckdb
只需要sql

R python julia都可以用duckdb

pseudo 写了: 2024年 5月 5日 14:10 个人而言,更喜欢R:主要是喜欢 bigtable 胜过 python 的 pandas。经常吐槽 pandas,太难用了。

希望科学计算这块将来会统一到 Julia。对了,Julia 的内核本质也是 Lisp。

#30 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 14:53
wyseman
tongmeng 写了: 2024年 5月 5日 13:37 我现在不再用SAS了
我还天天用sas

#31 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 14:57
fieldman
有那么点意思。我个人也不喜欢学很多小众语言的syntax, 所以在R里用一些sqlite, sqldf之类的接口,无奈太慢了。duckdb速度如何?看来需要研究研究。

wokao 写了: 2024年 5月 5日 14:47 用duckdb
只需要sql

R python julia都可以用duckdb

#32 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 16:08
wokao
fieldman 写了: 2024年 5月 5日 14:57 有那么点意思。我个人也不喜欢学很多小众语言的syntax, 所以在R里用一些sqlite, sqldf之类的接口,无奈太慢了。duckdb速度如何?看来需要研究研究。
sqldf很慢,R里最快的是data.table,现在polars也支持R了。

下边的是polars做的benchmark,没包括data.table,可以假设两者速度差不多。如果包括了读数据文件的时间,polars最快,duckdb其次;不包括读数据文件时间,duckdb更快。pandas要慢很多。

https://pola.rs/posts/benchmarks/

#33 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 18:41
owl
免费的R性能不行,商业的底层不一样,性能好很多
wildthing 写了: 2024年 5月 5日 11:19 R semantics is quite strange. Maybe due to historical reasons it is still popular. Its interface is quite pleasant and support for data operation is strong. On the other hand, performance is quite poor compared to Python. It may never go away. Python is stupid in its own right.

#34 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 19:37
wokao
“performance is quite poor compared to Python”

胡说八道,python缺省是link 到openblas,miniconda连到mkl,R连到自带的简陋线性代数库,但是可以很方便就连到openblas和mkl,然后R和Python就没有性能差异了,毕竟Python已经很慢,R即便比蜗牛慢也慢不了多少。实际上R的popular库大多是用C/C++写的

wildthing 写了: 2024年 5月 5日 11:19 R semantics is quite strange. Maybe due to historical reasons it is still popular. Its interface is quite pleasant and support for data operation is strong. On the other hand, performance is quite poor compared to Python. It may never go away. Python is stupid in its own right.

#35 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 5日 20:19
wildthing
wokao 写了: 2024年 5月 5日 19:37 “performance is quite poor compared to Python”

胡说八道,python缺省是link 到openblas,miniconda连到mkl,R连到自带的简陋线性代数库,但是可以很方便就连到openblas和mkl,然后R和Python就没有性能差异了,毕竟Python已经很慢,R即便比蜗牛慢也慢不了多少。实际上R的popular库大多是用C/C++写的
Just compare the dataframe of R and dataframe of Pandas. The performance difference is quite obvious.

I don't know why you have to use blas. If you have to use blas, you might as well use cublas, which is much better.

We are talking about performance of native code, not C libraries. The whole argument of R has good performance because the libraries are in C is complete bullshit. Python has numpy, which has excellent performance in most cases.

#36 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 6日 03:15
pseudo
wokao 写了: 2024年 5月 5日 14:47 用duckdb
只需要sql

R python julia都可以用duckdb
多谢,让我来试试。

如果用duckdb,Python 里面一般的函数都接受 duckdb 类型的数据输入吗?

#37 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 6日 06:26
wokao
dataframe
https://h2oai.github.io/db-benchmark/
R的data.table比pandas快得多, dplyr和pandas速度相当,但是语法要舒服很多

你大概是文科生,上了个统计课,用了一把R,和里边教学用的dataframe,然后就开始胡说八道了

至于什么用blas,更是胡说八道。你用numpy实际是要调用blas的,只不过Python安装的时候偷偷往你机器里安装了OpenBlas/MKL。跟R一样,Python里边有速度要求的numpy和scipy都是C/C++写的

R和Python都是解释性语言,都慢。想快,用Julia。

你应该跑英文bbs去练英文,跑这里真滑稽。
wildthing 写了: 2024年 5月 5日 20:19 Just compare the dataframe of R and dataframe of Pandas. The performance difference is quite obvious.

I don't know why you have to use blas. If you have to use blas, you might as well use cublas, which is much better.

We are talking about performance of native code, not C libraries. The whole argument of R has good performance because the libraries are in C is complete bullshit. Python has numpy, which has excellent performance in most cases.

#38 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 6日 06:33
wokao
julia是这样的:duckdb里边的table和Julia的DataFrame可以相互转换

SQL = "

"
df_combined = DuckDB.execute(con, SQL) |> DataFrame

DuckDB.register_data_frame(con, dfGDP, "GDP")

Python其实和DuckDB的说明书要长很多,应该更强大

pseudo 写了: 2024年 5月 6日 03:15 多谢,让我来试试。

如果用duckdb,Python 里面一般的函数都接受 duckdb 类型的数据输入吗?

#39 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 6日 08:06
wildthing
Python is compiled to a virtual machine language. It's not purely interpreted.

The original purpose of pandas is to improve the slow dataframe speed of R. You should read the paper by pandas author.

I study programming language for a living though I don't know much about R except it's pretty horrible.

Insulting my English doesn't make what you said true.

wokao 写了: 2024年 5月 6日 06:26 dataframe
https://h2oai.github.io/db-benchmark/
R的data.table比pandas快得多, dplyr和pandas速度相当,但是语法要舒服很多

你大概是文科生,上了个统计课,用了一把R,和里边教学用的dataframe,然后就开始胡说八道了

至于什么用blas,更是胡说八道。你用numpy实际是要调用blas的,只不过Python安装的时候偷偷往你机器里安装了OpenBlas/MKL。跟R一样,Python里边有速度要求的numpy和scipy都是C/C++写的

R和Python都是解释性语言,都慢。想快,用Julia。

你应该跑英文bbs去练英文,跑这里真滑稽。

#40 Re: R和PYTHON怎么比较

发表于 : 2024年 5月 6日 09:36
wokao
别扯淡了,py到pyc不算编译,那是解释器产生的,仅仅是为了日后解释器运行的时候load快一点。用一个版本的python 解释器产生的pyc没法被新版本python解释器解释,需要重新处理py文件产生pyc。很多解释语言都干这事。这跟java有本质不同。

你既然不咋懂r就不用评论了。

pandas比r中教学用的dataframe快,但是用r的不用那个dataframe干活。





wildthing 写了: 2024年 5月 6日 08:06 Python is compiled to a virtual machine language. It's not purely interpreted.

The original purpose of pandas is to improve the slow dataframe speed of R. You should read the paper by pandas author.

I study programming language for a living though I don't know much about R except it's pretty horrible.

Insulting my English doesn't make what you said true.