Types of Machine Learning

From Machine Learning
Jump to: navigation, search

This site gives a good overview of 10 different machine learning methods from classification methods to neural networks. Again, machine learning is simple to implement now there are lots of pre prepared libraries and resources, so go read that website for a quicker overview than what this page will provide!

For a slightly more broken down explanation and an understanding of where each type of machine learning method fits in, keep reading. The "More information" links lead to other pages on this wiki.

Types of Machine Learning based on the kind of learning employed

The mind map below shows the applications of the types of machine learning that will be discussed in this section. It is not comprehensive but provides a very good basis for understanding how different methods are used.

A high level overview of machine learning types and their applications


Supervised Methods (Regression and Classification)

Use a known dataset (training dataset) of labelled data to correct predictions towards the known outputs in the training dataset. Once the training period is complete it may be tested to avoid issues such as overfitting to the training dataset, then the method can be used to make predictions on a dataset where the outputs are unknown. Regression and Classification are two techniques used by supervised methods[1].

A classification problem is one where the output variable is a category. It assigns class labels to the training data uses them to classify new data.

A regression problem is one where the output variable is a real or continuous value. It predicts the relationship that best represents the given data.

Note: Sentiment analysis is a type of data mining that measures the inclination (positive or negative) of people’s opinions through Natural Language Processing[2]. It is an application of machine learning, usually classification, that tends to be monetised rather than published since the outputs are very valuable to business applications. Sentiment analysis takes texts (comments on public forums, reviews of products, feedback comments, etc) to find if they are positively or negatively reviewing a product or business. The difficulty lies in the fact that it objectively analyses the text for inherently subjective matter.


Unsupervised Methods (Clustering and Association)

Use unlabelled and uncategorised training datasets and find any patterns within the data. Labels may however be used in testing sets. They can perform more complex tasks than supervised methods, but the results may be unpredictable.

Clustering and Association are two techniques used by unsupervised methods.

A clustering problem[3] is one that breaks a dataset down into categories where the variables within each group are more similar to each other than they are to the variables within other groups. This is unlike classification since it is an unsupervised method and so must learn by finding the similarities between variables rather than being given pre labelled data to train on.

An association problem is one that finds strong relationships and rules within a dataset. This is done by identifying frequent associations between variables and defining the rule that associates them. Unlike regression, the algorithm has no knowledge of the type of relationships there could be (eg linear), it needs to find and define them.


Reinforcement Methods (Exploration and Exploitation)

Provide a model of the environment but not an analytic solution, and the software agent trains through positive or negative reinforcement, eventually learning the most efficient path to the goal. The agent learns through interaction with the environment.

Exploration (of uncharted territory) and Exploitation (of current knowledge) are two techniques used by reinforcement methods.

Exploration and exploitation are often used together in reinforcement algorithms. Some have a stronger exploration side (when a result is found, whether it is successful or not, the algorithm will continue to find more and different results), and some are stronger in exploitation (once a result is found, all efforts are concentrated on using this result to understand the data more).

A good example of applied reinforcement method is the application of machine learning to playing the game Super Mario. This article explains the theory very well, but the general idea is that the desired outcome is to beat the Mario levels by staying alive and reaching the end, and dying in a level is the undesired outcome. Much like how humans learn to play, the machine learning algorithm will encounter scenarios in Mario that cause it to die and restart the level, and the next time those scenarios come around it will try different techniques to avoid dying again, eventually figuring out the optimal technique.

Semi-Supervised Methods

These are a combination of supervised and unsupervised learning. The algorithm is given a shallow labelled training dataset which provides a basic training starting point. It can then label and classify larger volumes of uncategorised data. The model can then be retrained using the newly labelled dataset which will provide a more robust model that can then categorise and predict from unlabelled datasets.

Types of Machine Learning based on the expected algorithm output types

The following sections are explanations of different machine learning algorithms with visualisations on how they work. Most of the information is for interest's sake alone, since the mathematics has been implemented and is available in many languages as a callable function. Understanding how the models work can be helpful in determining which method to use.

Linear Regression

This is a linear model that assumes a linear relationship between the input variables (x) and the single output variable (y). x and y are numerical values.

Example (one x input): y = β0 + β1×x

A random error can also be accounted for by adding ε to the equation. More information

Logistic Regression

Logistic regression is a linear method. It takes one or multiple input values (x) and produces a single output value (y). y is a binary value so interpreting the results is out with the scope of the logistic regression model (ie. it cannot give qualitative information about the result), rather, it models the probability of an outcome. More information

Support Vector Machines

Support Vector Machines (SVM) are a supervised machine learning model. Making decisions based on a maximum distance optimised hyperplane, data points are classified into the different available labels in the data set. More information.

Decision Trees

Decision trees are one of the simplest supervised methods, instantly recognisable as a cascading tree structure. More information

Clustering

k-means clustering is a method that allows the grouping of data points with similar characteristics into a k number of groups. k is a hyperparameter and must be defined manually. More information.

Naïve-Bayes Classification

A simple and effective method that allows a quick understanding of the data. The (naïve) assumption that all data attributes are entirely independent is important to be aware of to avoid misleading conclusions to be drawn. More information



Ensemble Methods

Ensemble methods use multiple models to complement each other and make the predictions more accurate. These individual models are called the base learners.

Parallel ensemble methods use base learners that are independent from each other, that generate predictions parallel to each other. The error of the final prediction can be reduced from a single model method by averaging these independent results.

Sequential ensemble methods are where the base learners feed into and learn from each other. The performance of the overall model can be improved by weighting correct or incorrect predictions and reiterating the process.

Random Forest

Random forests can negate the tendency of decision trees to overfit to the training data. Since decision trees are very sensitive to changes in the data, using random forests can teach the model to learn from mistakes and overall be a more robust model.

Boosting

Boosting creates a strong classifier from a collection of weak learners.

Note: a weak learner is one who's performance is above chance, but only barely. A strong learner has a significantly higher success rate.

Boosting builds multiple incremental models to decrease the bias, while keeping variance small.

It is well suited to boost the performance of decision trees on classification problems. A widely used approach is one called AdaBoost, or Adaptive Boosting. It is a meta-algorithm developed for the purpose of making boosting attempts easier, and can be used with any machine learning algorithm to boost its performance[4].

The python library scikit-learn has good resources for preparing data for AdaBoost and implementing the boosting method.

Bagging

Bootstrap Aggregating ("Bagging") is a powerful method to improve the performance of simple models and reduce overfitting of more complex models. Instead of fitting the model on one sample of the population, several models are fitted on different samples with replacement of the population.These models are then aggregated by using their average, weighted average or a voting system.[5][6]

Bagging allows multiple similar models with high variance are averaged to decrease variance

Stacking

The point of stacking is to explore a space of different models for the same problem.

Stacking.png

The final model is said to be stacked on top of the previous ones. Often you end up with a model which is better than any individual intermediate model.

Neural Networks

Neural networks (NNs) are based on our understanding of the human brain by using nodes called "neurons". A neural network is made up of three types of layers of these neurons:

  • Input layer, containing the predictors (every NN has exactly one of these)
  • Output layer, containging the responses (every NN has exactly one of these. A regression NN will have a single node in the layer, a classifier may have a number of nodes for each class label)
  • Hidden layers. The number of hidden layers is up to choice, but it is difficult to train NNs with more than one hidden layer, and in most situations one layer will be sufficient. Each node is some function of the predictors, the nature of which depends partly on the network type and partly on user-defined specifications[7]
A Neural Network.jpg

Note: if your data is linearly separable, no hidden layers are needed, and while a NN will do the job it really isn't necessary. NNs make use of their potential in applications with non linear and complex relationships

Have a look at this interactive website to get a feel for how neural networks work!

Screenshot of the interactive website

The inputs for each node in the hidden layers are weighted. The outputs are generated by the activation function of the node.

More information on neural networks

References