Machine Learning is the science (and art) of programming computers so they can learn from data.
Here is a slightly more general definition:
“Machine Learning is the field of study that gives computers the ability to learn without being explicitly programmed.” – Arthur Samuel, 1959
And a more engineering-oriented one:
“A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.” – Tom Mitchell, 1997
For example, your spam filter is a Machine Learning program that can learn to flag spam given examples of spam emails (e.g., flagged by users) and examples of regular (non-spam, also called “ham”) emails. The examples that the system uses to learn are called the training set. Each training example is called a training instance (or sample). In this case, the task T is to flag spam for new emails, the experience E is the training data, and the performance measure P needs to be defined; for example, you can use the ratio of correctly classified emails. This particular performance measure is called accuracy and it is often used in classification tasks.
If you just download a copy of Wikipedia, your computer has a lot more data, but it is not suddenly better at any task. Thus, it is not Machine Learning.
Consider how you would write a spam filter using traditional programming techniques:
- First, you would look at what spam typically looks like. You might notice that some words or phrases (such as “4U”, “credit card” , “free” and “amazing”) tend to come up a lot in the subject. Perhaps you also notice a few other patterns in the sender’s name, the email body, and so on.
- You would write a detection algorithm for each of the patterns that you noticed and your program would flag emails as spam if a number of these patterns are detected.
- You would test your program and repeats the above steps until the spam is detected.
To summarize, Machine Learning is great for:
- Problems for which existing solutions require a lot of hand-tuning or long lists of rules: one Machine Learning algorithm can often simplify code and perform better.
- Complex problems for which there is no good solution at all using a traditional approach: the best Machine Learning techniques can find a solution.
- Fluctuating environments: a Machine Learning system can adapt to new data.
- Getting insights about complex problems and large amounts of data.
There are so many different types of Machine Learning systems that it is useful to classify them in broad categories based on:
- Whether or not they are trained with human supervision (supervised, unsupervised, semi-supervised, and Reinforcement Learning)
- Whether or not they can learn incrementally on the fly (online versus batch learning)
- Whether they work by simply comparing new data points to known data points, or instead detect patterns in the training data and build a predictive model, much like scientists do (instance-based versus model-based learning).
These criteria are not exclusive; you can combine them in any way you like. For example, a state-of-the-art spam filter may learn on the fly using a deep neural net‐ work model trained using examples of spam and ham; this makes it an online, model based, supervised learning system. Let’s look at each of these criteria a bit more closely.
In supervised learning, the training data you feed to the algorithm includes the desired solutions, called labels.
A typical supervised learning task is classification. The spam filter is a good example of this: it is trained with many example emails along with their class (spam or ham), and it must learn how to classify new emails.
Most Import Supervised Algorithms:
- KNN(k-nearest neighbors)
- Linear Regression
- Logistic Regression
- Naive Bayes
- Decision Trees and Random Forests
- Support Vector Machine(SVMs)
- Neural Networks
In unsupervised learning, as you might guess the data is unlabeled and the system tries to learn without a teacher.
Most Common Unsupervised Algorithm:
- Hierarchical Cluster Analysis(HCA)
- Expectation Maximization
Anomaly detection and novelty detection
- One-class SVM
- Isolation Forest
Visualization and Dimensionality Reduction
- Principal Component Analysis
- Kernel PCA
- Locally Linear Embedding(LLE)
- t-distributed Stochastic Neighbor Embedding(t-SNE)
Association Rule Mining
For example, you have a lot of data about blog visitors. You may want to run a clustering algorithm to try to predict the group of similar readers. At no point do you tell the algorithm which group a visitor belongs. It finds the connection between similar readers without your help. For example, it might notice 40% of your visitors are male who loves the comic books and generally read about your blog in the evening, while 20% are young sci-fi lovers who visit during the weekends and so on. If you use a hierarchical clustering algorithm you can easily divide the sub-groups.
Some algorithms can deal with partially labeled training data, usually a lot of unlabeled data and a little bit labeled data. This is called semisupervised learning.
Some photo-hosting services such as Google Photos are a good example of this. Once you upload all your family photos to the service, it automatically recognizes that the same person A shown up in photos 1, 5, and 11, while another person B shows up in photos 2,5 and 7. This is unsupervised part of the algorithm clustering. Now all the systems need is for you to tell it who these people are. Just label on photo per person and it is able to name everyone in the photo which is useful for searching for photos.
Most semi-supervised algorithms are a combination of supervised and unsupervised algorithms. For example, Deep Belief Networks(DBN) is based on unsupervised components called restricted Boltzmann Machines (RBMs) stacked on top of another. RBM is trained sequentially in an unsupervised manner and when the whole system is fine-tuned using supervised techniques.
Reinforcement Learning is a very different beast. The learning system called an agent in this context, can observe the environment, select and perform actions and get rewards in return or penalties in the form of the negative rewards. It must learn then by itself what is the best strategy called a policy, to get the most reward over time. A policy defines what action the agent should choose when it is in a given solution.
For example, many robots implement Reinforcement learning algorithms to learn how to walk. DeepMind’s AlphaGO program is also a good example of Reinforcement learning: it made the headlines in March 2016 when it beat the world champion Lee Sedol at the game of GO. It learned the winning policy by analyzing the millions of games and then playing many games against itself. Note the learning was turned off during the games against champion; AlphaGo was just applying the policy it just learned.