ArticleslgStudy

mathematics

Isotonic regression

Isotonic regression is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Isotonic regression rather than just read about it. In short: In statistics and numerical analysis, isotonic regression or monotonic regression is the technique of fitting a free-form line to a sequence of observations such that the fitted line is non-decreasing (or non-increasing) everywhere, and lies as close to the observations as possible. Applications Isotonic regression has applications in statistical inference.

Isotonic regression — main illustration
Isotonic regression — illustration

Key takeaways

  • Isotonic regression belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Isotonic regression to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Isotonic regression from memory before moving on to harder problems.

Reference excerpt

In statistics and numerical analysis, isotonic regression or monotonic regression is the technique of fitting a free-form line to a sequence of observations such that the fitted line is non-decreasing (or non-increasing) everywhere, and lies as close to the observations as possible.

Applications Isotonic regression has applications in statistical inference. For example, one might use it to fit an isotonic curve to the means of some set of experimental results when an increase in those means according to some particular ordering is expected. A benefit of isotonic regression is that it is not constrained by any functional form, such as the linearity imposed by linear regression, as long as the function is monotonic increasing. Another application is nonmetric multidimensional scaling, where a low-dimensional embedding for data points is sought such that order of distances between points in the embedding matches order of dissimilarity between points. Isotonic regression is used iteratively to fit ideal distances to preserve relative dissimilarity order. Isotonic regression is also used in probabilistic classification to calibrate the predicted probabilities of supervised machine learning models. Isotonic regression for the simply ordered case with univariate x,y has been applied to estimating continuous dose-response relationships in fields such as anesthesiology and toxicology. Narrowly speaking, isotonic regression only provides point estimates at observed values of x. Estimation of the complete dose-response curve without any additional assumptions is usually done via linear interpolation between the point estimates. Software for computing isotone (monotonic) regression has been developed for R, Stata, and Python.

Problem statement and algorithms Let (x1,y1),…,(xn,yn) be a given set of observations, where the yi∈ℝ and the xi fall in some partially ordered set. For generality, each observation (xi,yi) may be given a weight wi≥0, although commonly wi=1 for all i. Isotonic regression in the L2 metric seeks a weighted least-squares fit ŷi≈yi for all i, subject to the constraint that ŷi≤ŷj whenever xi≤xj. This gives the following quadratic program (QP) in the variables ŷ1,…,ŷn:

min⁡∑i=1nwi(ŷi−yi)2 subject to ŷi≤ŷj for all (i,j)∈E where E={(i,j):xi≤xj} specifies the partial ordering of the observed inputs xi (and may be regarded as the set of edges of some directed acyclic graph (dag) with vertices 1,2,…n). Problems of this form may be solved by generic quadratic programming techniques. In the usual setting where the xi values fall in a totally ordered set such as ℝ, we may assume WLOG that the observations have been sorted so that x1≤x2≤⋯≤xn, and take E={(i,i+1):1≤i<n}. In this case, a simple and efficient iterative algorithm for solving the quadratic program (of a "least squares" optimisation in the L2 metric) is the pool adjacent violators algorithm. Conversely, Best and Chakravarti studied the problem as an active set identification problem, and proposed a primal algorithm. These two algorithms can be seen as each other's dual, and both have a computational complexity of O(n) on already sorted data. To complete the isotonic regression task in the L2 metric, we may then choose any non-decreasing function f(x) such that f(xi)=ŷi for all i. Any such function obviously solves

minf∑i=1nwi(f(xi)−yi)2 subject to f being nondecreasing and can be used to predict the y values for new values of x. A common choice when xi∈ℝ would be to interpolate linearly between the points (xi,ŷi), as illustrated in the figure, yielding a continuous piecewise linear function:

f(x)={ŷ1if x≤x1ŷi+x−xixi+1−xi(ŷi+1−ŷi)if xi≤x≤xi+1ŷnif x≥xn It is possible -- but more time-consuming -- to compute an isotonic regression in a metric other than L2. An L1 fit has a least absolute deviation and may thus be more robust to large outliers than an L2 fit with its least squares criterion. Another generalisation is to unimodal regressions, i.e. to fits with a non-decreasing segment followed by a non-increasing segment (or vice versa).

Centered isotonic regression As this article's first figure shows, in the presence of monotonicity violations the resulting interpolated curve will have flat (constant) intervals. In dose-response applications it is usually known that f(x) is not only monotone but also smooth. The flat intervals are incompatible with f(x)'s assumed shape, and can be shown to be biased. A simple improvement for such applications, named centered isotonic regression (CIR), was developed by Oron and Flournoy and shown to substantially reduce estimation error for both dose-response and dose-finding applications. Both CIR and the standard isotonic regression for the univariate, simply ordered case, are implemented in the R package "cir". This package also provides analytical confidence-interval estimates.

References

Further reading

Robertson, T.; Wright, F. T.; Dykstra, R. L. (1988). Order restricted statistical inference. New York: Wiley. ISBN 978-0-471-91787-8. Barlow, R. E.; Bartholomew, D. J.; Bremner, J. M.; Brunk, H. D. (1972). Statistical inference under order restrictions; the theory and application of isotonic regression. New York: Wiley. ISBN 978-0-471-04970-8. Shively, T.S., Sager, T.W., Walker, S.G. (2009). "A Bayesian approach to non-parametric monotone function estimation". Journal of the Royal Statistical Society, Series B. 71 (1): 159–175. doi:10.1111/j.1467-9868.2008.00677.x. S2CID 119761196.{{cite journal}}: CS1 maint: multiple names: authors list (link) Wu, W. B.; Woodroofe, M.; Mentz, G. (2001). "Isotonic regression: Another look at the changepoint problem". Biometrika. 88 (3): 793–804. doi:10.1093/biomet/88.3.793.

Illustrations

Isotonic regression: An example of isotonic regression (solid red line) compared to linear regression on the same data, both fit to minimize the mean squared error. The free-form property of isotonic regression means the line can be steeper where the data are steeper; the isotonicity constraint means the line does not decrease.
An example of isotonic regression (solid red line) compared to linear regression on the same data, both fit to minimize the mean squared error. The free-form property of isotonic regression means the line can be steeper where the data are steeper; the isotonicity constraint means the line does not decrease.

Worked examples

Example 1 — a first encounter with Isotonic regression

Start with the simplest possible case. Write down what Isotonic regression claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Isotonic regression before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Isotonic regression ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Isotonic regression

In research
Isotonic regression appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Isotonic regression in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Isotonic regression is common in secondary-school and first-year university syllabi. It links to neighbouring topics Nonparametric Bayesian statistics, Nonparametric regression, Numerical analysis, so understanding it makes those chapters shorter.
In everyday life
Look for Isotonic regression outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Isotonic regression” →

How to study Isotonic regression in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Isotonic regression means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Isotonic regression out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Isotonic regression in simple terms?

In statistics and numerical analysis, isotonic regression or monotonic regression is the technique of fitting a free-form line to a sequence of observations such that the fitted line is non-decreasing (or non-increasing) everywhere, and lies as close to the observations as possible. Applications Is…

Why does Isotonic regression matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Isotonic regression?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Isotonic regression.

Tags

  • Nonparametric Bayesian statistics
  • Nonparametric regression
  • Numerical analysis

Keep exploring