And the Most Popular Language for Machine Learning Is...
It's the silver bullet question: What programming language should one learn to be the best at machine learning or data science? The answer lies in this article.
Join the DZone community and get the full member experience.Join For Free
What programming language should one learn to get a machine learning or data science job? That's the silver bullet question. It is debated in many forums. I could provide here my own answer to this and explain why, but I'd rather look at some data first. After all, this is what machine learners and data scientists should do: look at data, not opinions.
So, let's look at some data. I will use the trend search available on Indeed.com. It looks for occurrences over time of selected terms in job offers. It gives an indication of what skills employers are seeking. Note, however, that it is not a poll on which skills are effectively in use. It is rather an advanced indicator of how skill popularity evolve (more formally, it is probably close to the first order derivative of popularity as the latter is the difference between hiring skills plus retraining skills minus retiring and leaving skills).
When we focus on machine learning, we get similar data:
What can we derive from this data?
First of all, we see that one size does not fit all. A number of languages are fairly popular in this context.
Second, there is a sharp increase in popularity for all of these, reflecting the increased interest in machine learning and data science over the last few years.
Third, Python is the clear leader, followed by Java, then R, then C++. Python's lead over Java is increasing, while the lead of Java over R is decreasing. I must admit that I was surprised to see Java in second place; I was expecting R instead.
Fourth, Scala's growth is impressive. It was almost nonexistent three years ago and is now in the same ballpark as more established languages. This is easier to spot when we switch to the relative view of the data on Indeed.com:
Fifth, Julia's popularity is not anywhere near the others', but there is definitely an uptick. Will Julia turn in one of the popular languages for machine learning and data science? The future will tell.
If we ignore Scala and Julia in order to be able to zoom on the other languages' growth, then we confirm that Python and R grow faster than general-purpose languages.
It may be that R's popularity will pass that of Java soon given the difference in growth rate.
When we focus on deep learning with this query, the data is quite different:
There, Python is still the leader, but C++ is now second, then Java, and C at fourth place. R is only at the fifth rank. There is clearly an emphasis on high-performance computing languages here. Java is growing fast though. It could reach second place soon, as for machine learning in general. R isn't going to be near the top anytime soon. What surprises me is the absence of Lua, although it is used in one of the major deep learning frameworks (Torch). Julia isn't present, either.
The answer to the original question should now be clear. Python, Java, and R are most popular skills when it comes to machine learning and data science jobs. If you want to focus on deep learning rather than machine learning in general, then C++, and to some lesser extent C, are also worth considering. Remember, however, that this is only one way of looking at the problem. You may get a different answer if you are looking for a job in academia, or if you just want to have fun learning about machine learning and data science during your spare time.
What about my personal answer? I answered last year in this blog. Besides having support from many top machine learning frameworks, Python is a good fit for me because I have a computer science background. I would also feel comfortable with C++ for developing new algorithms, given that I've programmed in that language for most of my professional life. But this is me, and people with different background may feel better with another language. A statistician with limited programming skills will certainly prefer R. A strong Java developer can stay with his favorite language as there are significant open sources with Java API. And a case can certainly be made for any of the languages on these charts.
Therefore, my advice would be to read other blogs discussing the same question before investing significant time in learning a language.
Published at DZone with permission of Jean Francois Puget, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.