Stanford’s Machine Learning Course @ Coursera

Stanford’s Machine Learning course, taught by Dr. Andrew Ng was one of the courses that started the MOOC enthusiasm, and having now completed it, I can see why. I found it fascinating, mostly just the right of challenge, and a class I’ve gotten a lot out of. 

Machine Learning is basically having the computer figure our part of how to solve the problem, rather than explicitly programming in all the parameters. So, for example, you can feed parameters about items into the computer and tell it to group the items into a specified number of clusters and using, for example, k-means clustering, it will find the way to group them into the most distinct groups. Or you can use a neural network to identify hand-written digits by feeding the network training examples and the correct results, without ever trying to explicitly program how to distinguish a 1 from a 7 from a 4. 

Example classification results using logistic regression in Octave

Example classification results using logistic regression in Octave

The course is focused on machine learning algorithms, and seems to cover most of the basics, with the exception of ensemble methods. It is not a class in big data, but it is these same analytic approaches, adopted to handle large data sets, that are used in Big Data applications. Part of one of the last week’s videos provides a bit of an introduction to the issue that have to be addressed when applying the techniques to big data.

The class, like other MOOC’s I’ve taken, is light on theory to cut down on the difficulty and time required for the class. However this class provided some theory without proofs so that you gained an understanding of the topic and it wasn’t just a cookbook.  At the same time, it covered practical recommendations and guidance for putting what you learned in to use.  I really liked the balance. There are video lectures, typically with one or two questions in each video that aren’t scored, they just break up watching the video and provide a self-check that you are following the material. Then there are weekly homework problems typically 5, with some having multiple parts. They are multiple choice with most having multiple answers to provide (e.g., “check which of the following statements are true.”). In addition, there are hands-on programming assignments each week using Octave, which is a free programming language.  Octave has almost identical syntax to Matlab and you can use Matlab as an alternative. Octave uses a command line interface, however, rather than Matlab’s notebook approach.

With one exception, the assignments weren’t too hard, but took work.  The neural networks assignment about half-way through the course really took a lot of work to complete. I was worried that the assignments might get progressively harder, but they didn’t. 

The topics covered in the course are:

  1. Introduction to Machine Learning. Univariate linear regression. (Optional: Linear algebra review.)
  2. Multivariate linear regression. Practical aspects of implementation. Octave tutorial.
  3. Logistic regression, One-vs-all classification, Regularization.
  4. Neural Networks.
  5. Practical advice for applying learning algorithms: How to develop, debugging, feature/model design, setting up experiment structure.
  6. Support Vector Machines (SVMs) and the intuition behind them.
  7. Unsupervised learning: clustering and dimensionality reduction.
  8. Anomaly detection.
  9. Recommender systems.
  10. Large-scale machine learning. An example of an application of machine learning.

If you’ve any interest in the topic and are looking to learn, I highly recommend this course. It’s inspired me to continue to learn through the machine learning challenges at Kaggle. I’ve switched over from using Octave to the Scikit-learn package in python. All I can say about Scikit-learn in this article is WOW! What a powerful, convenient, and, especially given that’s it’s an open source project, amazingly well-documented. I’ll have more about Kaggle and Scikit-learn in a later post.