Live data from Hacker News

Ask HN: What is the best way to learn Machine Learning in Python?

news.ycombinator.com

31–40 of 50 posts

Re: Ask HN: What is the best way to learn Machine Learning in Python?

#31

My personal preference is to learn by doing, and the best place I've found for this particular task is Kaggle ( http://www.kaggle.com ). They have a variety of datasets and scored data mining tasks, great forums for every level, code examples, and even a set of tutorials specifically for learning scikit (one of Python's machine learning libraries): http://blog.kaggle.com/2015/04/08/new-video-series-introduct... I don…

I created a github repo ( https://github.com/apeeyush/machine-learning ) to store and organize the codes I used in Kaggle contests (mainly knowledge contests). Recently, I have participated in some vision and CTR prediction contests as well but could not update them here since the code is still very hacky. Will really appreciate any contribution from the community.

That's a nice repository, thanks for sharing! I'll be combing through that as I make the transition from R to Python ;)

Re: Ask HN: What is the best way to learn Machine Learning in Python?

#32
I just started going down this path. I began with using audio analysis to do some machine learning. (Detecting a specific audio pattern very easily recognizable to humans). Can't get too specific about it, as it's under NDA. But I had a little under two weeks to get a prototype built that either proved or disproved it would be possible.

The very first thing I did was take a step back and understand the domain of the data I was working with, and what the best way to present it for machine learning would be. In my case, I had to understand what the best format for presenting my audio would be (slightly modified MFCCs), and what the best library would be to get my data in that format.

Next, I needed to build a data set of proper training data. This mean I had to manually build a (largish) data set that matched exactly what I was looking for. So I went and downloaded a bunch of example audio, and then manually went through it, tagging it into the two bins I was looking to differentiate against.

Once I had this, (which actually took much more time than the learning itself), I was ready to do the actual machine learning itself. I used Theano, and figuring out how to translate my dataset into a format digestible by Theano took another chunk of time. Once I had my data in the proper format for Theano, it came down to basically playing with how I presented my initial data to Theano, and then tweaking my gradient.

Finally, I was able to train and get a net that was about 80% right with my hypothesis. There were a few edge cases I hadn't anticipated that wouldn't necessarily work well, but it gave us enough confidence to go through with more machine learning for our project.

So, takeaway suggestions: find a real project, something you want to learn, and then just do it. Gather knowledge of your data, build a dataset, and test a hypothesis. Most of this isn't machine learning, it's mostly just moving and shaping data, and knowing what in your data is significant. The machine learning algorithms are really just a tiny piece of the whole picture. Good luck.

Re: Ask HN: What is the best way to learn Machine Learning in Python?

#33
post #9

Peter Norvig's Artificial Intelligence: http://www.amazon.com/Artificial-Intelligence-Modern-Approac... Has plenty of examples in Python. You can also look at different Udacity courses. They have a couple dealing with ML with Python.

I have Norvig's book, I'm not sure I'd recommend that as an introduction ;) Awesome book though!

AIMA is about as introductory as these texts get (and still be valuable). It in an undergrad textbook after all.

Re: Ask HN: What is the best way to learn Machine Learning in Python?

#34
Machine learning is a pretty big field. The Coursera course is very good. It uses Octave not Python, but what you learn will be easy to transfer. It is mostly focused on neural networks. If you don't already know linear algebra you should probably learn that first.

These are three very good O'Reilly books that all use Python:

- Programming Collective Intelligence: A broad and shallow survey of automated machine learning techniques.

- Data Analysis with Open Source Tools: Also a survey. More focused on manual data exploration.

- Python for Data Analysis: A pandas tutorial (and more). Very helpful to learn the ML tools in the python ecosystem.

Fitting all that into two months sounds challenging.

Re: Ask HN: What is the best way to learn Machine Learning in Python?

#35
post #20

I don't mean to be blunt, but I don't think you're going to get what you want out of machine learning if you still need people to give you step-by-step instructions.

that's how education works

OP clearly has not even googled this. "python machine learning" pulls up many easily-accessible articles meant for beginners with no background in machine learning. The scikit-learn website is chock full of tutorials meant for beginners, with code examples!

How is someone with this little motivation going to learn something so complex? I want to allocate my time helping people who at least try first.

Re: Ask HN: What is the best way to learn Machine Learning in Python?

#37

Machine Learning is a sub-field of computer science and an area of intense current research. It has nothing to do with Python (a programming language) except that some machine learning algorithms might be implemented in Python. You might find Andrew Ng's Stanford Coursera course a good place to start. https://www.coursera.org/learn/machine-learning/home/info .

"Introdocution to Statistical Learning" by Trevor Hastie et al. [1] They have a free online class through Stanford [2] Sign in to their system and you can take the archived version for free. ISL is an excellent, free book, introducing you to ML, you can go deeper, but, to me this is where I wish I'd started. I am taking the Data Science track at Coursera (on Practical Machine Learning now) and I am kicking myself tha…

I also think this is one of the best entry level books, and the Stanford course looks good. This is what I recommend to people. In some ways, R is a very good match for this material, and you could move to python later.

Re: Ask HN: What is the best way to learn Machine Learning in Python?

#38
post #19

Check out scikit-learn and its excellent documentation.

Its excellent documentation has been down for 24 hours due to a failure at sourceforge. :( https://twitter.com/sfnet_ops?original_referer=http%3A%2F%2F...

alternative: apt-get install python-sklearn-doc

Re: Ask HN: What is the best way to learn Machine Learning in Python?

#39
post #30
post #26

Earlier quoted context omitted.

No, it really is not.

The people demanding you pay them tens of thousands per year, for them to tell you how to learn, say it is. We can trust them, right?

Do you really believe that's how higher education works?

Re: Ask HN: What is the best way to learn Machine Learning in Python?

#40

Earlier quoted context omitted.

I have Norvig's book, I'm not sure I'd recommend that as an introduction ;) Awesome book though!

AIMA is about as introductory as these texts get (and still be valuable). It in an undergrad textbook after all.

I guess my point is that it's such a broad overview of all topics that fall under artificial intelligence that you don't get much of a good introduction to applying machine learning. But point taken, you're right, it is an introductory text.
Post reply on HN