Live data from Hacker News

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

sebastianraschka.com

21–30 of 98 posts

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

#21
post #18

Octave/Matlab are "great" but good luck trying to integrate them into a production web application. Since you cant really do that - avoid using them unless you are fine with implementing the same algorithm twice. Matlab licenses cost money also, and the toolboxes cost additional money. R is useful because there are a lot of resources as it has been along for so long and is used by a large portion of the stats communi…

Octave/Matlab are "great" but good luck trying to integrate them into a production web application What problems are you facing with Octave? It has, in fact, been integrated into a couple of production web applications I know of: https://octave.im/ http://octave-online.net/ https://www.rollapp.com/app/octave I have promised a while ago to improve its Python integration so that Python and Octave can be in the same pro…

wow - i have never seen this. thanks for the links! (i take back my octave comment). that would help me

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

#22

Octave/Matlab are "great" but good luck trying to integrate them into a production web application. Since you cant really do that - avoid using them unless you are fine with implementing the same algorithm twice. Matlab licenses cost money also, and the toolboxes cost additional money. R is useful because there are a lot of resources as it has been along for so long and is used by a large portion of the stats communi…

I'd like to kindly challenge the notion that you can't integrate R into a web application. I've started using R to power jobs that are used by a large web application. The R packages httr or RCurl make it pretty easy to make http requests -- (enabling me to send things to a web server to be consumed into a database and run by back-end code). It's also possible to prepare data in R and then send to a space like S3 with a System("s3cmd sync some-data s3://some-data") call. I've also been using Python a good bit lately. I don't see either has having a universal advantage for a data pipeline.

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

#23
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.

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

#24
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 primitives makes it much less pleasant than Python for programs bigger than about 100 LOC though.

Dealing with higher-dimensional arrays, more sophisticated plotting, data munging, string processing, interfaces with external systems, etc. all left me banging my head in Matlab though, whereas Python makes it all a breeze.

Numpy’s broadcasting feature is also super nice, compared to wrapping everything in bsxfun calls in Matlab.

I wonder how much the @ operator in Python 3.5 will help students. Hopefully numpy can deprecate and phase out their "Matrix" object, and end the confusion about the meaning of basic operators.

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

#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 discovered the rvest package for webscraping.

Data visualizations with R seem vastly superior, unless I am missing something with Python (highly likely). And putting up a slick statistics app is easy with shiny or RStudio Presenter. But R can't really scale to a large production app, isn't that right?

So I feel I need to keep working with both Python and R.

Added: That's a nice list Lofkin. Thanks. Also, in the article he says that Python syntax feels more natural, which I also felt. But then I started to use things like the magrittr and dplyr packages in R which gives you nice things like pipes and that feeling starts to ebb.

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

#28
post #7

I switched from mostly using R to Python about a year ago for gluing together my data pipeline (from data source all the way to production models and frontends/visualizations). It hasn't really impacted what I'm capable of doing or my productivity, except the standard extra googling that comes in the first couple years I use any language. The main reason I went for Python is purely practical: it's a language people o…

The part about sharing makes a lot of sense since Python use is so wide spread. The throwing-over-the-wall effect isn't a language specific issue, more of a work culture issue. Seems to me if you practice "literate programming" with R markdown you can greatly improve the sharing aspect and reduce the throw-it-over-the-wall issue.

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

#29
post #19

Earlier quoted context omitted.

Have you found the Octave GUI to be unusable?

Personally, yes, but I tried about 5 years ago.

It didn't exist 5 years ago, so you must have tried one of the 3rd party crappy attempts at making a GUI. Sadly, it's difficult for Octave to shake off its reputation.

Try the GUI again. Here is a web version of it that is almost identical to running it on your own desktop:

https://www.rollapp.com/app/octave

This web version is based on Octave 3.8.1, though. Octave 4.0 has a much better version of the GUI:

https://en.wikipedia.org/wiki/GNU_Octave#/media/File:Octave-...

If you have Windows, try our installer:

https://ftp.gnu.org/gnu/octave/windows/

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

#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

Post reply on HN