In statistics, ordinal regression, also called ordinal classification, is a type of regression analysis used for predicting an ordinal variable, i.e. a variable whose value exists on an arbitrary scale where only the relative ordering between different values is significant. It can be considered an intermediate problem between regression and classification.[1] [2] Examples of ordinal regression are ordered logit and ordered probit. Ordinal regression turns up often in the social sciences, for example in the modeling of human levels of preference (on a scale from, say, 1–5 for "very poor" through "excellent"), as well as in information retrieval. In machine learning, ordinal regression may also be called ranking learning.[3]
Ordinal regression can be performed using a generalized linear model (GLM) that fits both a coefficient vector and a set of thresholds to a dataset. Suppose one has a set of observations, represented by length- vectors through, with associated responses through, where each is an ordinal variable on a scale . For simplicity, and without loss of generality, we assume is a non-decreasing vector, that is, . To this data, one fits a length- coefficient vector and a set of thresholds with the property that . This set of thresholds divides the real number line into disjoint segments, corresponding to the response levels.
The model can now be formulated as
\Pr(y\lei\midx)=\sigma(\thetai-w ⋅ x)
or, the cumulative probability of the response being at most is given by a function (the inverse link function) applied to a linear function of . Several choices exist for ; the logistic function
\sigma(\thetai-w ⋅ x)=
1 | ||||||
|
gives the ordered logit model, while using the probit function gives the ordered probit model. A third option is to use an exponential function
\sigma(\thetai-w ⋅ x)=1-\exp(-\exp(\thetai-w ⋅ x))
which gives the proportional hazards model.[4]
The probit version of the above model can be justified by assuming the existence of a real-valued latent variable (unobserved quantity), determined by[5]
y*=w ⋅ x+\varepsilon
where is normally distributed with zero mean and unit variance, conditioned on . The response variable results from an "incomplete measurement" of, where one only determines the interval into which falls:
y=\begin{cases} 1&if~~y*\le\theta1,\\ 2&if~~\theta1<y*\le\theta2,\\ 3&if~~\theta2<y*\le\theta3\\ \vdots\\ K&if~~\thetaK-1<y*. \end{cases}
Defining and, the above can be summarized as if and only if .
From these assumptions, one can derive the conditional distribution of as
\begin{align} P(y=k\midx) &=P(\thetak-1<y*\le\thetak\midx)\\ &=P(\thetak-1<w ⋅ x+\varepsilon\le\thetak)\\ &=\Phi(\thetak-w ⋅ x)-\Phi(\thetak-1-w ⋅ x) \end{align}
where is the cumulative distribution function of the standard normal distribution, and takes on the role of the inverse link function . The log-likelihood of the model for a single training example, can now be stated as
logl{L}(w,\theta\midxi,yi) =
K | |
\sum | |
k=1 |
[yi=k]log[\Phi(\thetak-w ⋅ xi)-\Phi(\thetak-1-w ⋅ xi)]
(using the Iverson bracket .) The log-likelihood of the ordered logit model is analogous, using the logistic function instead of .[6]
In machine learning, alternatives to the latent-variable models of ordinal regression have been proposed. An early result was PRank, a variant of the perceptron algorithm that found multiple parallel hyperplanes separating the various ranks; its output is a weight vector and a sorted vector of thresholds, as in the ordered logit/probit models. The prediction rule for this model is to output the smallest rank such that .[7]
Other methods rely on the principle of large-margin learning that also underlies support vector machines.[8] [9]
Another approach is given by Rennie and Srebro, who, realizing that "even just evaluating the likelihood of a predictor is not straight-forward" in the ordered logit and ordered probit models, propose fitting ordinal regression models by adapting common loss functions from classification (such as the hinge loss and log loss) to the ordinal case.[10]
ORCA (Ordinal Regression and Classification Algorithms) is an Octave/MATLAB framework including a wide set of ordinal regression methods.
R packages that provide ordinal regression methods include MASS[11] and Ordinal.
. Alan Agresti . Analysis of ordinal categorical data . Wiley . Hoboken, N.J . 2010 . 978-0470082898 .
. William Greene (economist) . Econometric Analysis . Seventh . Boston . Pearson Education . 2012 . 978-0-273-75356-8 . 824–842 .