Discriminative models, also referred to as conditional models, are a class of logistical models used for classification or regression. They distinguish decision boundaries through observed data, such as pass/fail, win/lose, alive/dead or healthy/sick.
Typical discriminative models include logistic regression (LR), conditional random fields (CRFs) (specified over an undirected graph), decision trees, and many others. Typical generative model approaches include naive Bayes classifiers, Gaussian mixture models, variational autoencoders, generative adversarial networks and others.
Definition
Unlike generative modelling, which studies the joint probability , discriminative modeling studies the or maps the given unobserved variable (target) to a class label dependent on the observed variables (training samples). For example, in object recognition, is likely to be a vector of raw pixels (or features extracted from the raw pixels of the image). Within a probabilistic framework, this is done by modeling the conditional probability distribution , which can be used for predicting from . Note that there is still distinction between the conditional model and the discriminative model, though more often they are simply categorised as discriminative model.
Pure discriminative model vs. conditional model
A conditional model models the conditional probability distribution, while the traditional discriminative model aims to optimize on mapping the input around the most similar trained samples.
Typical discriminative modelling approaches
The following approach is based on the assumption that it is given the training data-set , where is the corresponding output for the input .
Linear classifier
We intend to use the function to simulate the behavior of what we observed from the training data-set by the linear classifier method. Using the joint feature vector , the decision function is defined as:
According to Memisevic's interpretation, , which is also , computes a score which measures the compatibility of the input with the potential output . Then the determines the class with the highest score.
Logistic regression (LR) Since the 0-1 loss function is a commonly used one in the decision theory, the conditional probability distribution , where is a parameter vector for optimizing the training data, could be reconsidered as following for the logistics regression model: , with
The equation above represents logistic regression. Notice that a major distinction between models is their way of introducing posterior probability. Posterior probability is inferred from the parametric model. We then can maximize the parameter by following equation:
It could also be replaced by the log-loss equation below:
Since the log-loss is differentiable, a gradient-based method can be used to optimize the model. A global optimum is guaranteed because the objective function is convex. The gradient of log likelihood is represented by:
where is the expectation of .
The above method will provide efficient computation for the relative small number of classification.
Contrast with generative model
Contrast in approaches
Let's say we are given the class labels (classification) and feature variables, , as the training samples.
A generative model takes the joint probability , where is the input and is the label, and predicts the most possible known label for the unknown variable using Bayes' theorem.
Discriminative models, as opposed to generative models, do not allow one to generate samples from the joint distribution of observed and target variables. However, for tasks such as classification and regression that do not require the joint distribution, discriminative models can yield superior performance (in part because they have fewer variables to compute). On the other hand, generative models are typically more flexible than discriminative models in expressing dependencies in complex learning tasks. In addition, most discriminative models are inherently supervised and cannot easily support unsupervised learning. Application-specific details ultimately dictate the suitability of selecting a discriminative versus generative model.