We’ve previously talked about what Machine Learning is? And why we use it. In this article we’ll focus more on the different types of Machine Learning Systems, and when to use each one of them. Machine Learning systems can be classified according to the amount and type of supervision they get during training. There are four major categories: supervised learning, unsupervised learning, semi-supervised learning, and Reinforcement Learning. In this article you will learn the following:
- Supervised Machine Learning Algorithms
- Unsupervised Machine Learning Algorithms
- Semi-supervised Machine Learning Algorithms
- Reinforcement Learning
- References & Resources
In a supervised learning algorithm, the provided data to the algorithm are “Labeled”, meaning they include a label along with every training instance.
A typical supervised learning task is image Classification, as we can see in the training set above, All instances are provided a label that indicate weather the image is a dog or a cat. The learning algorithm must learn from the training data how classify new images.
Another supervised task is to predict a numeric value, which is also known as a regression problem, such as the housing price prediction. Given a set of features (House price, area, number of bedrooms) called predictors. To train a system that predicts a numeric value you need to give it many examples of houses, including their predictors and their labels (actual price).
Some regression algorithms can be used for classification as well, for example logistic regression is commonly used for classification, as it can output a value that corresponds to the probability of belonging to a specific label (e.g., 80% chance of being a cat image).
Here are some of the most important supervised learning algorithms:
- K-Nearest Neighbors
- Linear Regression
- Logistic Regression
- Support Vector Machines (SVMs)
- Decision Trees and Random Forests
- Neural networks
As you might have guessed, In unsupervised learning the training data is unlabeled. The system tries to learn without an labels provided.
As seen in the following figure, the dataset contains images of dogs, cats and ducks with no labels provided to each instance (image). You may want to run a clustering algorithm (unsupervised) to try to detect similar images. At no point did we tell the clustering algorithm which animal an image is. It finds those connection without your help.
The clustering algorithm successfully separated the 3 animals groups by learning their low level features from the provided images dataset.
Another really good example of unsupervised learning algorithms is Visualization algorithms.
you feed the visualization algorithm a lot of complex and unlabeled data, and it outputs a 2D or 3D representation of your data that can easily be plotted. Such algorithms try to preserve as much structure as they can, so you can understand how the data is organized. This task is very important and usually results in identifying unsuspected patterns. In the following figure the algorithm is trying to keep separate clusters in the input space from overlapping in the visualization.
Another related task is dimensionality reduction, in which the goal of the algorithm is to reduce and simplify the data amount of data without losing too much information. One way to do this is to merge several correlated features into each other. For example, a patient’s immune system may be very correlated with his age, so the dimensionality reduction algorithm will merge them into one feature. This is called feature extraction.
Yet another important unsupervised task is anomaly detection. For example, detecting spam emails as mentioned in our Introduction to Machine Learning article, since spam is considered anomaly. In such systems, it usually shown normal instances during training, so it learns to recognize them very well. And when it’s presented a new instance it can tell whether it looks like a normal one or whether it is likely an anomaly.
When we have a little bit of labeled data and a lot of unlabeled data, some algorithms can deal with such datasets which we call partially labeled training datasets. This is called Semi-supervised learning.
For example, when you upload some photos of you and your family to Facebook, the algorithm will automatically recognize that the same person (Called A) shows in photos 1,2 and 4. While another person (B) shows up in photos 2,5 and 7. This is the unsupervised part of the algorithm (clustering). Now all that’s left for the system to do is to tell who person A and B are, one label per person and it will be able to name everyone in these photos. This algorithm is very useful in photo-hosting services and searching images.
When you think about it, most semi-supervised learning algorithms are combinations of supervised and unsupervised algorithms. For example, Semi-supervised learning with generative models can be viewed either as an extension of supervised learning (classification plus information about or as an extension of unsupervised learning (clustering plus some labels).
Reinforcement Learning is a completely different story. The learning system, called an agent
in this context, observes the environment, selects and perform actions, and gets rewards in return (or penalties in the form of negative rewards). It must then learn by itself what is the best strategy, called a policy, to get the most reward over time. A policy defines what actions the agent should choose when it is presented a situation.