机器学习r和python_R vs Python用于机器学习

机器学习r和python

There are so many things to learn before to choose which language is good for Machine Learning. We will discuss each and everything about R as well as Python and the situation or problem in which situation we have to use which language. Let’s start

选择适合机器学习的语言之前,需要学习很多东西。 我们将讨论有关R以及Python的所有内容,以及我们必须使用哪种语言的情况或问题。 开始吧

Python and R are the two most Commonly used Programming Languages for Machine Learning and because of the popularity of both the languages Novice or you can say fresher are getting confused, whether they should choose R or Python language to commence their career in the Machine learning domain. Don’t worry guys through this article we will discuss R vs Python for Machine Learning. So, without exaggerating this article let’s get started.

Python和R是机器学习中最常用的两种编程语言,并且由于这两种语言都非常流行,因此无论是新手还是新手都感到困惑,无论是选择R还是Python语言来开始他们在机器学习领域的职业。 不用担心,通过本文,我们将讨论机器学习的R vs Python。 因此,在不夸大本文的情况下,让我们开始吧。

We will start it from the very Basics things or definitions.

我们将从最基础的东西或定义开始。

R vs Python用于机器学习 (R vs Python for Machine Learning)

介绍 (Introduction)

R is a programming language made by statisticians and data miners for statistical analysis and graphics supported by R foundation for statistical computing. R also provides high-quality graphics and it also has some popular libraries which help in analytical parts such as R Markdown and shiny.

R是由统计学家和数据挖掘人员开发的一种编程语言,用于统计分析和R基金会支持的用于统计计算的图形。 R还提供高质量的图形,并且还具有一些流行的库,这些库有助于分析R Markdown和Shiny等分析零件。

On the other hand, Python is a simple, easy, fully-fledged and object-oriented high programming language which is used for web development or Software Development made by the very good programmers and the developers’ for the use of general purpose programming. Python is far-flung used in GUI based application’s such of them are games, graphics design, Web applications.

另一方面,Python是一种简单,易用,功能全面且面向对象的高级编程语言,由非常好的程序员和开发人员使用通用编程进行Web开发或软件开发。 Python在基于GUI的应用程序中广泛使用,例如游戏,图形设计,Web应用程序。

So, guys we can say that R programming language functionality is developed by statisticians’ mind, by thereby give us an advantage in a specific field. While python is often praised for being a general-purpose language with an easy-to-understand.

因此,伙计们,我们可以说R编程语言功能是由统计学家开发的,从而使我们在特定领域中具有优势。 虽然python通常是一种易于理解的通用语言,但却广受赞誉。

速度 (Speed)

Let us start from the very first factor, that is the speed of the language.

让我们从第一个因素开始,那就是语言的速度。

R vs Python

When it comes to the speed, python is faster than R only till 1000 iterations but after the 1000 iterations, R starts using the lapply function which increases its speed, in that situation R becomes faster than python. So, both have their own advantages with their limits. let move to the next point i.e code and syntax.

就速度而言,直到1000次迭代,python才比R快,但经过1000次迭代后,R开始使用lapply函数,该函数提高了速度,在这种情况下,R变得比python更快。 因此,两者都有其自身的优势和局限性。 让我们移动到下一点,即代码和语法。

代码和语法 (Code and Syntax)

In this point, we will discuss the data variables declarations, Data handling capacity with the scatterplot visualization and the clusPlot graphics.

在这一点上,我们将讨论数据变量声明,散点图可视化和clusPlot图形的数据处理能力。

R vs Python 2

Starting with variable declaration. Let’s take the case of string here. As R uses the similar implementation to that of the S programming language, which uses arrow sign in order to initialize the variables which were also present in case of S programming. These arrows can be used from right to left or left to right indicating whom to assign the variables whereas, python uses an assignment operator to initialize the variables.

从变量声明开始。 让我们在这里以字符串为例。 由于R使用与S编程语言类似的实现,该语言使用箭头符号来初始化在S编程情况下也存在的变量。 这些箭头可以从右到左或从左到右使用,指示谁来分配变量,而python使用赋值运算符来初始化变量。

So, Basically, R developers thought that it would be better to tell the direction of the assignment rather than just using an assignment operator, which could actually confuse any new programmer about which variable is assigned. next thing data handling capability, here we will discuss the case of Scatterplots’, by which you will see the visualizations in R and Python.

因此,从根本上讲,R开发人员认为最好告诉分配的方向,而不是仅仅使用赋值运算符,这实际上会使任何新程序员对分配变量感到困惑。 接下来是数据处理功能,在这里我们将讨论Scatterplots的案例,通过它您将看到R和Python中的可视化。

R vs Python 3

These are the piece of codes in R and Python and after running  these codes, you will get the very similar plot results in both the cases, if you check the code here, then this shows that how R data science ecosystem has many smaller packages like GGally, which basically is a package that helps ggplot2 and also it is the most-used R plotting package whereas, In Python, matplotlib  is the  primary plotting package, and seaborn is widely used layer over the matplotlib. So, these are plots result we were talking about. Graph results of R and Python are both similar, but the only difference is their visualization. So, based on the graph results we can conclude that R has Many packages supporting different method of doing things whereas there is usually one way to do something in python. Moving to the next thing that is graphics.

这些是R和Python中的代码段,运行这些代码后,在两种情况下您都将获得非常相似的绘图结果,如果在此处检查代码,则表明R数据科学生态系统如何具有许多较小的软件包,例如GGally,它基本上是一个有助于ggplot2的软件包,它也是最常用的R绘图软件包,而在Python中,matplotlib是主要的绘图软件包,而seaborn是matplotlib上广泛使用的层。 因此,这些是我们正在讨论的情节结果。 R和Python的图形结果都相似,但是唯一的区别是它们的可视化。 因此,根据图的结果,我们可以得出结论,R有许多支持不同方法的软件包,而在python中通常只有一种方法。 移动到下一个是图形的东西。

So, guys here we will discuss the case plots, we already discussed that R was basically built for statistically analysis, so it has many specific libraries for plotting as well. This is the reasons R come up with beautiful graphs and charts whereas python’s main agenda, not for statistical analysis. So, in the early stages of the python packages for data analysis was an issue, but it has improved a lot.

因此,在这里,我们将讨论案例图,我们已经讨论过R基本上是为统计分析而构建的,因此它也具有许多用于绘制的特定库。 这就是R提出漂亮的图形和图表而python的主要议程而非统计分析的原因。 因此,在用于数据分析的python软件包的早期是一个问题,但它已经有了很大的改进。

深度学习 (Deep Learning)

As you all know almost the majority of the companies are working on Artificial Intelligence (AI), and Deep Learning is the main part of artificial intelligence. So, when it comes to Deep Learning, Python is more versatile then R as it provides more features to deep learning whereas R is new to Deep Learning.

众所周知,几乎所有公司都在研究人工智能(AI),而深度学习人工智能的主要组成部分。 因此,在深度学习方面,Python比R更通用,因为它为深度学习提供了更多功能,而R是深度学习的新手。

R vs Python 4

R has newly added APIs like Keras and KerasR which are written in Python. So, guys somewhere in your mind, this question might be floating why Keras? Actually, Keras in Python has the capabilities to run over pythons’ strong APIs like tensorflow or Theano or Microsoft’s CNTK we can say that python has the greater advantage here. Till now we learn both are useful in their own areas or terms.

R新增了用Python编写的Keras和KerasR等API。 所以,在您脑海中某个地方的家伙,这个问题可能会浮出水面,为什么Keras? 实际上,Python中的Keras具有运行python强大的API(如tensorflow或Theano或Microsoft的CNTK)的功能,我们可以说python在这里具有更大的优势。 到现在为止,我们了解到两者在各自的领域或术语中都是有用的。

百分比切换 (Percentage Switching)

R vs Python 5

In the past years of Research, the percentage of switching people R to Python are more as compared to Python to R. Let’s say if 10% people are switching from Python to R then, 20% are switching from R to Python which is double as compared to the before scenario. Next point this about trend community support and jobs.

在过去的几年的研究中,与从Python切换到R相比,从R切换到Python的比例更高。假设有10%的人从Python切换到R,那么有20%的人从R切换到Python,是原来的两倍。与之前的情况相比。 接下来要介绍有关趋势社区的支持和工作。

发展趋势 (Trends)

R v Python Google Trend

So, guys lets talk about trend according to the google in last 5 years. The R was more in use but after that, we can see Python is in trend because of its popularity it has overall good support of general purpose programming. If we talk about community support:

因此,根据Google过去5年的发展趋势,伙计们来讨论一下趋势。 R越来越多地被使用,但是在那之后,我们可以看到Python处于流行趋势,因为它的普及为通用编程提供了良好的支持。 如果我们谈论社区支持:

R vs Python 6

Python and R support are quite similar to each other because python supports Mailing list, User-contributed code documentation, and Stack-overflow. So, basically it has more adoption from developers and programmers whereas R language support as also found at Mailing list, User-contributed documentation, and Active Stack-overflow members So, basically R has more adoption for researchers, DataScientist and Statisticians.

Python和R的支持彼此非常相似,因为python支持邮件列表,用户提供的代码文档和堆栈溢出。 因此,基本上,它在开发人员和程序员中得到了更多的采用,而在邮件列表,用户提供的文档和Active Stack-overflow成员中也发现了R语言的支持。因此,基本上,R对于研究人员,DataScientist和Statisticians的采用也更多。

Job Trend

工作趋势

Now, lets talk about the job trend.

现在,让我们谈谈工作趋势。

R v Python Jobs Trend

This is the google graph of the job trend of Python and R. So, guys this Job Posting of R and Python in past 5 years worldwide whereas Python is asked more in comparison to R. How it is possible? because of its popularity and easy to understand feature. Since python is a very versatile programming language which can be used for majority of the purpose such as web-development, game development, artificial intelligence, data science, statistical analysis, etc, whereas R language used among statisticians and Data miners for developing statistical software and Data analysis which clear us that’s why more job for python than R.

这是python和R的工作趋势的Google图表。所以,伙计们在过去5年里在全球范围内进行R和Python的职位发布,而相对于R,Python被问到更多。 由于其受欢迎程度和易于理解的功能。 由于python是一种非常通用的编程语言,可以用于大多数目的,例如网络开发,游戏开发,人工智能,数据科学,统计分析等,而R语言在统计学家和数据挖掘者中用于开发统计软件和数据分析使我们明白这就是为什么python比R做更多工作的原因。

Looking for best software engineer resume? Checkout Enhancv.com.

寻找最佳软件工程师简历 ? 结帐Enhancv.com。

In the end, I would like to say both the programming languages are important with their uses. But as we discussed in the previous section python is booming over the years.

最后,我想说两种编程语言在它们的使用中都很重要。 但是正如我们在上一节中讨论的那样,Python多年来一直在蓬勃发展。

翻译自: https://www.thecrazyprogrammer.com/2019/04/r-vs-python-for-machine-learning.html

机器学习r和python

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值