107 points · by mrborgen · 11y ago · 35 comments
So I'm interested in some advice on how to best spend my time, given that I'd like to get as much practical knowledge as possible.
Here is the level I'm at now:
I'm currently halfways though Andrew Ng's ML course on Coursera, and will probably finish this within the week. I love the mix of theory an practice this course is based around.
I've also done the Udacity - Intro to Machine Learning, but found it too theoretical.
I kind of understand the basic principles of linear & logistic regression, cost functions and gradient descent & the normal equation.
By the end of the week, I hope to be able to do linear regression using gradient descent on an actual dataset. If so, the week has been very well spent!
My preferred language is Python.
All tips and suggestions are highly appreciated :)
Much of what you learn in Ng's course is how to implement these algorithms - there's less (no?) emphasis on using existing libraries in R or Python. I think that implementing your own code base for logistic regression, neural net, random forest, and so forth is an extremely valuable exercise, but I'd recommend you put that aside just for the moment. Instead, try using some of the existing libraries.
For instance, use scikit-learn's logistic regression, neural net, and random forest (not covered in Ng's class) libraries to do a classification. You don't want to use these with no understanding of how they work, but you've done the coursera, so see if you can use your knowledge of how these algorithms differ to create dataset that will highlight the benefits each approach (i.e.., can you create a dataset that works great for logistic regression but poorly for neural nets, or random forest?) Think about how you'd use an unsupervised approach to classification, and run it through k-means. I really think that applying different techniques to the same dataset, on a high level, combined with general knowledge of what's going on under the hood, can be a great way to understand how/when to use these algorithms.
http://norvig.com/21-days.html
Go to Kaggle and do one of the competitions.
https://www.kaggle.com/competitions
and reference the wiki for help:
https://www.kaggle.com/wiki/Home
In my opinion, the only way to learn machine learning without a strong foundation is to page in learning. That means you'll need to pick a practical task and just jump into it and find out what you don't know.
If you've never done anything practical, great you'll need to learn about the basic data structures of machine learning.
Find out what a data frame is, what time series analysis is and what data structures you need to do it.
Are you going to do classification or prediction? Pick one and learn some of the basic tools used for it.
I'm considering to use a dataset Bank of England has about households in England. As far as I understand, the data can be used for both prediction and classification. It has quite a lot of different features.
Which one would you recommend to start with, in general?
This will let you setup a whole pipeline from feature selection (in this case just normalise, you can try 0 to 1 or -1 to 1 or subtract mean then divide by stddev, or don't normalize and see what happens) to training the model and evaluating its performance with cross validation. Then you can check your CV results by submitting to the leaderboard.
I took Andrew Ng's ML course then played with the MNIST dataset. I learnt heaps by doing this. Then I got carried away competing in real competitions. :) That's where more advanced feature selection came into play as well as making sure your CV split is representative of the test split.
I was using scikit-learn and just swapping classifiers in and out trying different ones as well as trying different parameters. You can even roll your own logistic regression if you want and see how regularisation affects performance etc.
Perhaps the cheat sheet in itself is useful for you, but mostly I'd recommend the process of assembling information in a concise way as a good way to learn.
Random Forest is a very powerful technique these days that's usually pretty good as a first-pass. Using it with permutation importance usually helps you identify important variables.
I cover several other machine learning "getting started" recommendations at http://stackoverflow.com/a/598772/1869
That's just one example, but all implementations are reasonably easy for someone with your foundation to learn quickly. Now... being good at it... that will be your next challenge :-)
My two cents.
I quite like this site for an accessible, well-scoped intro with some good example code: http://guidetodatamining.com/
Framework: http://deeplearning.net/software/theano/ Tutorial: http://deeplearning.net/tutorial/gettingstarted.html#getting...
It's in JavaScript, but if that works for you, clone it down and work through the instructions until it isn't broken. He created it as part of a lecture at Hack Reactor called "A Conjurer's Guide to Machine Learning," so it's a great way to get started without going too deep into the details.
Especially this: https://www.youtube.com/watch?v=L7R4HUQ-eQ0
Here's the ipython notebook
https://github.com/jakevdp/sklearn_pycon2015
It helped me make my first Kaggle submission, although i'm rank 1800 out of 1900 on the restaurant review one. But i'm sure with time i'll figure it out.
Try applying it some of the problems you want to solve. Mostly be patient. Unlike conventional programming, machine learning is non deterministic and can take some time to become a little comfortable
Enjoy :)
Question for the audience: Will self-learning be enough to get me considered for a job in this area ? I work on stuff that completely unrelated right now (MSEE in circuits).
https://www.youtube.com/watch?v=URTZ2jKCgBc&list=PLQVvvaa0Qu...
2: Learn how to manipulate Numpy arrays ( http://www.engr.ucsb.edu/~shell/che210d/numpy.pdf ) and how to read and manipulate data with Pandas ( https://www.youtube.com/watch?v=p8hle-ni-DM ).
3: Do the Kaggle Titanic survival prediction challenge with Random Forests. ( https://www.kaggle.com/c/titanic/details/getting-started-wit... )
4: Study Scikit-learn documentation ( http://scikit-learn.org/stable/documentation.html ). Run a few examples. Change RandomForestClassifier into SGDClassifier and play with the results. Scale the data to make it perform better. Combine a RF model and a SGD model through averaging and try to improve the benchmark score.
5: Study the ensemble module of Scikit-learn. Try the examples on the wiki of XGBoost ( https://github.com/dmlc/xgboost/tree/master/demo/binary_clas... ) and Vowpal Wabbit ( http://zinkov.com/posts/2013-08-13-vowpal-tutorial/ ). Practically you want to get to a stage of: Getting the data transformed to be accepted by the algo, a form of evaluation, and then getting the predictions back out in a sensible form.
Then next week start competing on Kaggle and form a team to join up with people at your level. You will learn a lot that way and start to open up the black box.
I found these series very accessible: http://blog.kaggle.com/2015/04/22/scikit-learn-video-3-machi...
Kaggle also recently released a feature to run machine learning scripts in your browser. You could check those out and check out Python, R, common pipelines and even the more advanced neural nets: https://www.kaggle.com/users/9028/danb/digit-recognizer/big-... .