5 reasons to tell you why Julia is better than Python?


The full text 2050 words, when learning is expected to grow 6 Fenzhong

Source: Pexels

Julia is a multi-function paradigm programming language used primarily in machine learning and statistical programming.

Python is another machine learning for multi-paradigm programming language, although we usually think Python is object-oriented.

On the other hand, Julia based more on functional paradigm. Although Julia certainly no less popular than Python, but Julia will be used for scientific data have some substantial benefits, making it in many cases Python is a better choice.

 

1, widely

 

Python is a very wide range of applications, many things you can do with Python, but you can not do with Julia. Of course, this is only the local language, because versatility means we are talking about is the versatility of language. Julia codes R, Latex, Python and C are common executable code, which means that a typical data science projects are likely to write only once, and compile it from another language wrapper to native Julia or only send string.

 

PyCall and RCall is quite a big deal. Taking into account a serious drawback Julia is actually a package, so call Python and R is very convenient when needed. PyCall been well implemented in Julia, and doing very well, very useful.

 

2, multiple dispatch

 

 

Julia is a very unique type of language, it has its own quirks and characteristics, but one of the coolest features is multiple dispatch Julia's. First and foremost is, Julia's multiple dispatch fast. In addition, the use of multiple dispatch Julia function definition such as an attribute of the application structure as possible.

 

Moreover, the use of multiple dispatch Julia makes the function can be extended. This is a great benefit for the expansion pack, because whenever imported display method, the user can change it. Explicit method of introducing the extended configuration and routing to the new function will be very easy.

 

3, speed

 

 

谈到Julia不谈速度是很难的。Julia以速度快而自豪。Julia与Python不同,Python是一种编译语言,它主要是用自己的基础编写的。然而,与C等其他编译语言不同,Julia是在运行时编译的,而传统语言是在执行之前编译的。Julia,特别是写得好的时候,可以和C语言一样快,有时甚至比C语言更快。Julia使用即时(JIT)编译器,编译速度非常快,尽管它编译起来更像是一种解释语言,而不是像C语言或Fortran这样的传统低级编译语言。

 

4. 包管理器(Package Manager)

 

首先要说的是,Julia的Pkg包管理器是Python的Pip包管理器之上的整个世界。Pkg附带了自己的REPL和Julia包,可以从中构建、添加、删除和实例化包。这特别方便,因为Pkg与Git的连接。更新很容易,添加软件包总是很容易的,而且总的来说Pkg在Python的Pip上随时都可以使用。

 

5.在机器学习中的应用

 

来源:Pexels

与Python不同,Julia用于统计和机器学习。Python是在90年代早期作为一种简单的面向对象语言创建的,尽管从那时起它已经发生了很大的变化。考虑到Python的历史,以及Python的广泛用途(因为它非常流行),使用Julia这种专门为高级统计工作而设计的语言可以显示出很多好处。

 

Julia比Python稍胜一筹的另一个方面是线性代数。Vanilla Python可以通过线性代数,但vanilla Julia可以飞跃线性代数。当然,这是因为Python从未打算支持机器学习中的所有矩阵和方程。这不是Python的坏处,尤其是在NumPy上,但是就一个没有包的体验而言,Julia觉得这类数学更受欢迎。Julia的操作数系统比Python的更接近R,这是一个很大的好处。大多数线性代数是更快和更容易做。下面展示一个向量点积方程(dot-product equation),以便进一步说明这一点:

 

Python -> y =np.dot(array1,array2)R -> y <- array1 * array2Julia -> y = array1 .* array2

结论

 

来源:Pexels

使用哪种语言并不重要,不管是R、Julia、Python还是Scala。然而,需要注意的是,每一种语言都有其缺点,没有一种语言会成为“完美的语言”。如果你在编程上多才多艺,从机器学习到GUI再到API,情况尤其如此。Python有更好的包,通常如果项目足够小,我会转向Python,但是对于具有数百万观察的数据集,甚至很难用Python读取此类数据。

 

总之,我很看好Julia.的未来。Julia写起来很有趣,而且将来在数据科学领域可能会变得更加可行。


推荐阅读专题

留言点赞发个朋友圈

我们一起分享AI学习与发展的干货

编译组:安然

相关链接:

https://towardsdatascience.com/5-ways-julia-is-better-than-python-334cc66d64ae

如转载,请后台留言,遵守转载规范

推荐文章阅读

ACL2018论文集50篇解读

EMNLP2017论文集28篇论文解读

2018年AI三大顶会中国学术成果全链接

ACL2017论文集:34篇解读干货全在这里

10篇AAAI2017经典论文回顾

长按识别二维码可添加关注

读芯君爱你

发布了807 篇原创文章 · 获赞 2698 · 访问量 44万+

Guess you like

Origin blog.csdn.net/duxinshuxiaobian/article/details/104489481