supervised learning see also unsupervised learning machine learning anddata mining problems classification clustering regression anomaly detection automl association rules reinforcement learning structured prediction feature engineering feature learning online learning semisupervised learning unsupervised learning learning to rank grammar induction supervised learning classification regression decision trees ensembles bagging boosting random forest knn linear regression naive bayes artificial neural networks logistic regression perceptron relevance vector machine rvm support vector machine svm clustering birch cure hierarchical kmeans expectationmaximization em dbscan optics meanshift dimensionality reduction factor analysis cca ica lda nmf pca tsne structured prediction graphical models bayes net conditional random field hidden markov anomaly detection knn local outlier factor artificial neural networks autoencoder deep learning multilayer perceptron rnn lstm gru restricted boltzmann machine som convolutional neural network unet reinforcement learning qlearning sarsa temporal difference td theory biasvariance dilemma computational learning theory empirical risk minimization occam learning pac learning statistical learning vc theory machinelearning venues nips icml ml jmlr arxivcslg glossary of artificial intelligence glossary of artificial intelligence related articles list of datasets for machinelearning research outline of machine learning machine learning portalvte supervised learning is the machine learning task of learning a function that maps an input to an output based on example inputoutput pairs in supervised learning each example is a pair consisting of an input object typically a vector and a desired output value also called the supervisory signal a supervised learning algorithm analyzes the training data and produces an inferred function which can be used for mapping new examples an optimal scenario will allow for the algorithm to correctly determine the class labels for unseen instances this requires the learning algorithm to generalize from the training data to unseen situations in a reasonable way see inductive bias the parallel task in human and animal psychology is often referred to as concept learning steps in order to solve a given problem of supervised learning one has to perform the following steps determine the type of training examples before doing anything else the user should decide what kind of data is to be used as a training set in case of handwriting analysis for example this might be a single handwritten character an entire handwritten word or an entire line of handwriting gather a training set the training set needs to be representative of the realworld use of the function thus a set of input objects is gathered and corresponding outputs are also gathered either from human experts or from measurements determine the input feature representation of the learned function the accuracy of the learned function depends strongly on how the input object is represented typically the input object is transformed into a feature vector which contains a number of features that are descriptive of the object the number of features should not be too large because of the curse of dimensionality but should contain enough information to accurately predict the output determine the structure of the learned function and corresponding learning algorithm for example the engineer may choose to use support vector machines or decision trees complete the design run the learning algorithm on the gathered training set some supervised learning algorithms require the user to determine certain control parameters these parameters may be adjusted by optimizing performance on a subset called a validation set of the training set or via crossvalidation evaluate the accuracy of the learned function after parameter adjustment and learning the performance of the resulting function should be measured on a test set that is separate from the training set algorithm choice a wide range of supervised learning algorithms are available each with its strengths and weaknesses there is no single learning algorithm that works best on all supervised learning problems see the no free lunch theorem there are four major issues to consider in supervised learning biasvariance tradeoff biasvariance dilemma a first issue is the tradeoff between bias and variance imagine that we have available several different but equally good training data sets a learning algorithm is biased for a particular input x displaystyle x if when trained on each of these data sets it is systematically incorrect when predicting the correct output for x displaystyle x a learning algorithm has high variance for a particular input x displaystyle x if it predicts different output values when trained on different training sets the prediction error of a learned classifier is related to the sum of the bias and the variance of the learning algorithm generally there is a tradeoff between bias and variance a learning algorithm with low bias must be flexible so that it can fit the data well but if the learning algorithm is too flexible it will fit each training data set differently and hence have high variance a key aspect of many supervised learning methods is that they are able to adjust this tradeoff between bias and variance either automatically or by providing a biasvariance parameter that the user can adjust function complexity and amount of training data the second issue is the amount of training data available relative to the complexity of the true function classifier or regression function if the true function is simple then an inflexible learning algorithm with high bias and low variance will be able to learn it from a small amount of data but if the true function is highly complex eg because it involves complex interactions among many different input features and behaves differently in different parts of the input space then the function will only be learnable from a very large amount of training data and using a flexible learning algorithm with low bias and high variance dimensionality of the input space a third issue is the dimensionality of the input space if the input feature vectors have very high dimension the learning problem can be difficult even if the true function only depends on a small number of those features this is because the many extra dimensions can confuse the learning algorithm and cause it to have high variance hence high input dimensionality typically requires tuning the classifier to have low variance and high bias in practice if the engineer can manually remove irrelevant features from the input data this is likely to improve the accuracy of the learned function in addition there are many algorithms for feature selection that seek to identify the relevant features and discard the irrelevant ones this is an instance of the more general strategy of dimensionality reduction which seeks to map the input data into a lowerdimensional space prior to running the supervised learning algorithm noise in the output values a fourth issue is the degree of noise in the desired output values the supervisory target variables if the desired output values are often incorrect because of human error or sensor errors then the learning algorithm should not attempt to find a function that exactly matches the training examples attempting to fit the data too carefully leads to overfitting you can overfit even when there are no measurement errors stochastic noise if the function you are trying to learn is too complex for your learning model in such a situation the part of the target function that cannot be modeled corrupts your training data this phenomenon has been called deterministic noise when either type of noise is present it is better to go with a higher bias lower variance estimator in practice there are several approaches to alleviate noise in the output values such as early stopping to prevent overfitting as well as detecting and removing the noisy training examples prior to training the supervised learning algorithm there are several algorithms that identify noisy training examples and removing the suspected noisy training examples prior to training has decreased generalization error with statistical significance other factors to consider important other factors to consider when choosing and applying a learning algorithm include the following heterogeneity of the data if the feature vectors include features of many different kinds discrete discrete ordered counts continuous values some algorithms are easier to apply than others many algorithms including support vector machines linear regression logistic regression neural networks and nearest neighbor methods require that the input features be numerical and scaled to similar ranges eg to the interval methods that employ a distance function such as nearest neighbor methods and support vector machines with gaussian kernels are particularly sensitive to this an advantage of decision trees is that they easily handle heterogeneous data redundancy in the data if the input features contain redundant information eg highly correlated features some learning algorithms eg linear regression logistic regression and distance based methods will perform poorly because of numerical instabilities these problems can often be solved by imposing some form of regularization presence of interactions and nonlinearities if each of the features makes an independent contribution to the output then algorithms based on linear functions eg linear regression logistic regression support vector machines naive bayes and distance functions eg nearest neighbor methods support vector machines with gaussian kernels generally perform well however if there are complex interactions among features then algorithms such as decision trees and neural networks work better because they are specifically designed to discover these interactions linear methods can also be applied but the engineer must manually specify the interactions when using them when considering a new application the engineer can compare multiple learning algorithms and experimentally determine which one works best on the problem at hand see cross validation tuning the performance of a learning algorithm can be very timeconsuming given fixed resources it is often better to spend more time collecting additional training data and more informative features than it is to spend extra time tuning the learning algorithms algorithms the most widely used learning algorithms are support vector machines linear regression logistic regression naive bayes linear discriminant analysis decision trees knearest neighbor algorithm neural networks multilayer perceptron how supervised learning algorithms work given a set of n displaystyle n training examples of the form x 1 y 1 x n y n displaystyle x1y1xnyn such that x i displaystyle xi is the feature vector of the ith example and y i displaystyle yi is its label ie class a learning algorithm seeks a function g x y displaystyle gxto y where x displaystyle x is the input space and y displaystyle y is the output space the function g displaystyle g is an element of some space of possible functions g displaystyle g usually called the hypothesis space it is sometimes convenient to represent g displaystyle g using a scoring function f x y r displaystyle fxtimes yto mathbb r such that g displaystyle g is defined as returning the y displaystyle y value that gives the highest score g x arg max y f x y displaystyle gxunderset yarg max fxy let f displaystyle f denote the space of scoring functions although g displaystyle g and f displaystyle f can be any space of functions many learning algorithms are probabilistic models where g displaystyle g takes the form of a conditional probability model g x p y x displaystyle gxpyx or f displaystyle f takes the form of a joint probability model f x y p x y displaystyle fxypxy for example naive bayes and linear discriminant analysis are joint probability models whereas logistic regression is a conditional probability model there are two basic approaches to choosing f displaystyle f or g displaystyle g empirical risk minimization and structural risk minimization empirical risk minimization seeks the function that best fits the training data structural risk minimization includes a penalty function that controls the biasvariance tradeoff in both cases it is assumed that the training set consists of a sample of independent and identically distributed pairs x i y i displaystyle xiyi in order to measure how well a function fits the training data a loss function l y y r 0 displaystyle lytimes yto mathbb r geq 0 is defined for training example x i y i displaystyle xiyi the loss of predicting the value y displaystyle hat y is l y i y displaystyle lyihat y the risk r g displaystyle rg of function g displaystyle g is defined as the expected loss of g displaystyle g this can be estimated from the training data as r e m p g 1 n i l y i g x i displaystyle rempgfrac 1nsum ilyigxi empirical risk minimization empirical risk minimization in empirical risk minimization the supervised learning algorithm seeks the function g displaystyle g that minimizes r g displaystyle rg hence a supervised learning algorithm can be constructed by applying an optimization algorithm to find g displaystyle g when g displaystyle g is a conditional probability distribution p y x displaystyle pyx and the loss function is the negative log likelihood l y y log p y x displaystyle lyhat ylog pyx then empirical risk minimization is equivalent to maximum likelihood estimation when g displaystyle g contains many candidate functions or the training set is not sufficiently large empirical risk minimization leads to high variance and poor generalization the learning algorithm is able to memorize the training examples without generalizing well this is called overfitting structural risk minimization structural risk minimization seeks to prevent overfitting by incorporating a regularization penalty into the optimization the regularization penalty can be viewed as implementing a form of occams razor that prefers simpler functions over more complex ones a wide variety of penalties have been employed that correspond to different definitions of complexity for example consider the case where the function g displaystyle g is a linear function of the form g x j 1 d j x j displaystyle gxsum j1dbeta jxj a popular regularization penalty is j j 2 displaystyle sum jbeta j2 which is the squared euclidean norm of the weights also known as the l 2 displaystyle l2 norm other norms include the l 1 displaystyle l1 norm j j displaystyle sum jbeta j and the l 0 displaystyle l0 norm which is the number of nonzero j displaystyle beta j s the penalty will be denoted by c g displaystyle cg the supervised learning optimization problem is to find the function g displaystyle g that minimizes j g r e m p g c g displaystyle jgrempglambda cg the parameter displaystyle lambda controls the biasvariance tradeoff when 0 displaystyle lambda 0 this gives empirical risk minimization with low bias and high variance when displaystyle lambda is large the learning algorithm will have high bias and low variance the value of displaystyle lambda can be chosen empirically via cross validation the complexity penalty has a bayesian interpretation as the negative log prior probability of g displaystyle g log p g displaystyle log pg in which case j g displaystyle jg is the posterior probabability of g displaystyle g generative training the training methods described above are discriminative training methods because they seek to find a function g displaystyle g that discriminates well between the different output values see discriminative model for the special case where f x y p x y displaystyle fxypxy is a joint probability distribution and the loss function is the negative log likelihood i log p x i y i displaystyle sum ilog pxiyi a risk minimization algorithm is said to perform generative training because f displaystyle f can be regarded as a generative model that explains how the data were generated generative training algorithms are often simpler and more computationally efficient than discriminative training algorithms in some cases the solution can be computed in closed form as in naive bayes and linear discriminant analysis generalizations there are several ways in which the standard supervised learning problem can be generalized semisupervised learning in this setting the desired output values are provided only for a subset of the training data the remaining data is unlabeled active learning instead of assuming that all of the training examples are given at the start active learning algorithms interactively collect new examples typically by making queries to a human user often the queries are based on unlabeled data which is a scenario that combines semisupervised learning with active learning structured prediction when the desired output value is a complex object such as a parse tree or a labeled graph then standard methods must be extended learning to rank when the input is a set of objects and the desired output is a ranking of those objects then again the standard methods must be extended approaches and algorithms analytical learning artificial neural network backpropagation boosting metaalgorithm bayesian statistics casebased reasoning decision tree learning inductive logic programming gaussian process regression genetic programming group method of data handling kernel estimators learning automata learning classifier systems minimum message length decision trees decision graphs etc multilinear subspace learning naive bayes classifier maximum entropy classifier conditional random field nearest neighbor algorithm probably approximately correct learning pac learning ripple down rules a knowledge acquisition methodology symbolic machine learning algorithms subsymbolic machine learning algorithms support vector machines minimum complexity machines mcm random forests ensembles of classifiers ordinal classification data preprocessing handling imbalanced datasets statistical relational learning proaftn a multicriteria classification algorithm applications bioinformatics cheminformatics quantitative structureactivity relationship database marketing handwriting recognition information retrieval learning to rank information extraction object recognition in computer vision optical character recognition spam detection pattern recognition speech recognition supervised learning is a special case of downward causation in biological systems general issues computational learning theory inductive bias overfitting machine learning uncalibrated class membership probabilities unsupervised learning version spaces list of datasets for machine learning research machine learning open source software mloss 