Live data from Hacker News

Ask HN: Why is Python so popular for ML/DS?

news.ycombinator.com

1–10 of 21 posts

Re: Ask HN: Why is Python so popular for ML/DS?

#2
Java, R, Python, C and C++ are massive in machine learning and Data Science. The reason Python is at the top is because it has the largest set of machine learning and data analysis tools, tutorials, easy setup and easiest use-ability and extremely minimal to no boiler plate needed to get results.

Re: Ask HN: Why is Python so popular for ML/DS?

#4
Prototyping is what you usually do in ML/DS. You code incrementally and break things really fast.

Python (IPython/Jupyter) and R's interactive mode is really indispensable for this. Without restarting/re-initialize every variables and modules from beginning, you can run code snippet, run, edit part of code, run, add some code, plot something, run, repeat...

Re: Ask HN: Why is Python so popular for ML/DS?

#5

Prototyping is what you usually do in ML/DS. You code incrementally and break things really fast. Python (IPython/Jupyter) and R's interactive mode is really indispensable for this. Without restarting/re-initialize every variables and modules from beginning, you can run code snippet, run, edit part of code, run, add some code, plot something, run, repeat...

This + gazillion of optimized math functions and algos are available right out of the box for all platforms.

Re: Ask HN: Why is Python so popular for ML/DS?

#6
Python was big in scientific computing before ML went mainstream. In college we were taught using matlab Mathematica and sci-py. So there were a lot of stats and science libraries available in python. Academics typically don’t care about software engineering or typing so python is an easy approachable choice.

Re: Ask HN: Why is Python so popular for ML/DS?

#7
Python stands on the shoulders of the giants, namely MPI/MKL/BLAS/LAPACK, which was the core of numpy, scipy and sympy. Maybe even SageMath.

If you are developing ML/DS models, a REPL environment comes very handy, there is IPython.

You'll find a large chunk of your time is spent on gathering, cleaning data, which Python really excels.

Make a website that integrates or visualize the data with Python? Sure

You can not find a second language this versatile and has a well supported ecosystem.

Re: Ask HN: Why is Python so popular for ML/DS?

#9
It's the easiest language to learn from the list you described. C#/Go/Java are statically typed and compiled, which creates a barrier for learning. R is too complicated and showing it's age. Python is a sweet spot.

Data scientists aren't interested in learning industrial programming languages (C#, Java and maybe Go), they just want to do their job, and it doesn't require industrial language.

Re: Ask HN: Why is Python so popular for ML/DS?

#10
If the question is historical, it is because Python is easy to learn, easy to read, interfacing with C/C++ is easy to get existing ML/DS code, and it was one of the first scripting languages to handle huge numbers which is important in science.

If the question is about now, Python has lots of libraries to help in addition to the previously mentioned reasons. However Java still has better library support for NLP overall such as OpenNLP, Stanford CoreNLP, etc. NLP in Python is catching up though thanks to gensim, spacy, etc.

Post reply on HN