Live data from Hacker News

Python, Machine Learning, and Language Wars. A Highly Subjective Point of View

sebastianraschka.com

31–40 of 98 posts

Re: Python, Machine Learning, and Language Wars. A Highly Subjective Point of View

#31

One thing missing here: Matlab syntax is actually very close to modern Fortran. At least twice I've written Fortran code (for Monte Carlo simulations; different contexts) by overwriting Matlab code adding types / general verbosity / fixing the syntax of do-loops / etc.

They've been trying to Javaify the Matlab syntax for close to two decades now. They're moving towards making everything an object like in Java. They're getting pretty close to that.

Re: Python, Machine Learning, and Language Wars. A Highly Subjective Point of View

#32
post #5

As someone who almost exclusively uses Julia for their day-to-day work (and side projects), I think most of the author's thoughts about Julia are correct. I think the language is great, and using it makes my life better. There are some packages that are actually better than any of their equivalents in other languages, in my opinion. On the other hand, I've also got a higher tolerance for things not being perfect, I c…

I quickly glanced at your bio, but day-to-day work is that? Count yourself exceedingly lucky!

Re: Python, Machine Learning, and Language Wars. A Highly Subjective Point of View

#33
post #5

As someone who almost exclusively uses Julia for their day-to-day work (and side projects), I think most of the author's thoughts about Julia are correct. I think the language is great, and using it makes my life better. There are some packages that are actually better than any of their equivalents in other languages, in my opinion. On the other hand, I've also got a higher tolerance for things not being perfect, I c…

I've used Python professionally for 8 years, and it's my favorite language. I have used numpy and a scikit-learn a little bit. That said, I've really enjoying learning Julia recently. It's been easy to learn and it really does perform well (read: it's fast). In fact, I think learning Julia has been about as much work as learning something like numba would be, and gives similar (some say slightly better?) performance.

Re: Python, Machine Learning, and Language Wars. A Highly Subjective Point of View

#34
post #30
post #26

I just completed the Coursera data science track which took me from a complete R newbie to being at least somewhat proficient. Having previously used Python for a quite a bit of web programming, I disliked R at first except for its power in statistical programming. But I've since discovered a number of great R packages that make it a pleasure to use for things I would normally turn to Python for. Like I recently disc…

For stats plotting in python: https://github.com/mwaskom/seaborn https://github.com/yhat/ggplot For stats plotting and web apps in python: https://github.com/bokeh/bokeh For calling r libraries in python: https://pypi.python.org/pypi/rpy2 For out of core datasets in python: https://github.com/blaze/dask https://github.com/blaze/blaze

Nice collection, let me add one more item to this list:

Seaborn: statistical data visualization: http://stanford.edu/~mwaskom/software/seaborn/

Re: Python, Machine Learning, and Language Wars. A Highly Subjective Point of View

#35
post #20
post #12

Earlier quoted context omitted.

Interesting! It's hard for a single person to tell, because you can only start one way digging into machine learning. However, from a teacher's perspective, this is a useful observation. I also started with Matlab since it was the language that was used in my classes. However, I think this is also a little bit context dependent: For someone who has never programmed before, Matlab may be more intuitive. I think in an…

For someone who has never programmed before, Matlab may be more intuitive. Yes, this is Matlab's target audience: programmers who will not call themselves "programmers". In recent versions, they have tried even harder to hide the code away from the user, by trying to make everything work by clicking on buttons. I have heard from many Matlab users call themselves "not a programmer". They don't feel like writing softwa…

On balance, I've met people who claim they are intermediate programmers and use matlab only, and are freaked to shit when they see higher order functions in other languages, or even the idea of passing a "function", like, say, a pointer to a function, into another function, even though function pointers have existed since C.

Re: Python, Machine Learning, and Language Wars. A Highly Subjective Point of View

#36
post #9

Andrew Ng said in the Coursera Machine learning class that according to his experience, students implement the course homework faster in Octave/Matlab than in Python. But yes, the point of that course is to implement and play around with small numerical algorithms, whereas the linked blog is about someone who mainly calls existing machine learning libraries from Python. Ref. https://news.ycombinator.com/item?id=44858…

Interesting. In my own experience trying to implement the same image processing algorithms in Matlab vs. numpy, the work took about the same amount of effort any time arrays were limited to 1-2 dimensions, all the code was simple numerical stuff, and it wasn’t necessary to break the code up into multiple functions. The Matlab one-file-per-function thing, the lack of namespaces, and general lack of code structuring pr…

Just want to leave a comment about the "Matrix" object. I remember the first day I got started with NumPy. Coming from MATLAB, I really felt tempted to use it. However, I also saw an recommendation (can't remember if I read this in the NumPy documentation or in an online forum) that ndarrays are more widely supported. I never really bothered about `Matrix` then, and honestly, I have never ever seen anyone using it. Maybe you will find some examples on GitHub if you really search for it, but it is practically non-existend.

Re: Python, Machine Learning, and Language Wars. A Highly Subjective Point of View

#37
post #20

Earlier quoted context omitted.

For someone who has never programmed before, Matlab may be more intuitive. Yes, this is Matlab's target audience: programmers who will not call themselves "programmers". In recent versions, they have tried even harder to hide the code away from the user, by trying to make everything work by clicking on buttons. I have heard from many Matlab users call themselves "not a programmer". They don't feel like writing softwa…

On balance, I've met people who claim they are intermediate programmers and use matlab only, and are freaked to shit when they see higher order functions in other languages, or even the idea of passing a "function", like, say, a pointer to a function, into another function, even though function pointers have existed since C.

They exist in Matlab too. They're called function handles. Matlab has functionalish functions like `arrayfun`, `cellfun` (akin to `map`) or `accumarray` (akin to `fold`), but the Matlab documentation prefers to teach loops, presumably because they're easier to understand, and usually faster in Matlab thanks to their JIT compiler.

I'm surprised that people are so surprised that you can pass function handles around, since there are some Matlab functions for solving ODEs or root-finding that are very commonly taught in intro courses that require function handles. I guess not everyone's first exposure to Matlab involves solving ODEs or root-finding.

Re: Python, Machine Learning, and Language Wars. A Highly Subjective Point of View

#39
>I think it [Perl] is still quite common in the bioinformatics field though!?

That's true - many day-to-day tasks in bioinformatics are more or less plain-text parsing [1], and Perl excels in parsing text and quickly using regular expressions. "My" generation of bioinformaticians doing data cleanup and analysis (20-30) uses Python, sometimes because plotting is nicer, the language is easier to get into, it's more commonly taught in universities, or other reasons - people older than that normally use Perl.

Both BioPython and BioPerl are extremely useful.

[1] Relevant quote from Robert Edgar: "Biology = strcomp()" from https://robertedgar.wordpress.com/2010/05/04/an-unemployed-g...

Re: Python, Machine Learning, and Language Wars. A Highly Subjective Point of View

#40
post #9

Andrew Ng said in the Coursera Machine learning class that according to his experience, students implement the course homework faster in Octave/Matlab than in Python. But yes, the point of that course is to implement and play around with small numerical algorithms, whereas the linked blog is about someone who mainly calls existing machine learning libraries from Python. Ref. https://news.ycombinator.com/item?id=44858…

Interesting. In my own experience trying to implement the same image processing algorithms in Matlab vs. numpy, the work took about the same amount of effort any time arrays were limited to 1-2 dimensions, all the code was simple numerical stuff, and it wasn’t necessary to break the code up into multiple functions. The Matlab one-file-per-function thing, the lack of namespaces, and general lack of code structuring pr…

I would imagine, for a beginner, in Python the difference between a list and a numpy array can be confusing. And in numpy, column vectors and row vectors are a different thing. Whereas in Octave/Matlab "everything just works" in the do-what-I-mean sense.

> The Matlab one-file-per-function thing

By the way, Octave does not have that limitation.

Post reply on HN