ArticleslgStudy

mathematics

Linear predictor function

Linear predictor function 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 Linear predictor function rather than just read about it. In short: In statistics and in machine learning, a linear predictor function is a linear function (linear combination) of a set of coefficients and explanatory variables (independent variables), whose value is used to predict the outcome of a dependent variable. This sort of function usually comes in linear regression, where the coefficients are called regression coefficients.

Key takeaways

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

Reference excerpt

In statistics and in machine learning, a linear predictor function is a linear function (linear combination) of a set of coefficients and explanatory variables (independent variables), whose value is used to predict the outcome of a dependent variable. This sort of function usually comes in linear regression, where the coefficients are called regression coefficients. However, they also occur in various types of linear classifiers (e.g. logistic regression, perceptrons, support vector machines, and linear discriminant analysis), as well as in various other models, such as principal component analysis and factor analysis. In many of these models, the coefficients are referred to as "weights".

Definition The basic form of a linear predictor function f(i) for data point i (consisting of p explanatory variables), for i = 1, ..., n, is

f(i)=β0+β1xi1+⋯+βpxip, where xik, for k = 1, ..., p, is the value of the k-th explanatory variable for data point i, and β0,…,βp are the coefficients (regression coefficients, weights, etc.) indicating the relative effect of a particular explanatory variable on the outcome.

Notations It is common to write the predictor function in a more compact form as follows:

The coefficients β0, β1, ..., βp are grouped into a single vector β of size p + 1. For each data point i, an additional explanatory pseudo-variable xi0 is added, with a fixed value of 1, corresponding to the intercept coefficient β0. The resulting explanatory variables xi0(= 1), xi1, ..., xip are then grouped into a single vector xi of size p + 1.

Vector Notation This makes it possible to write the linear predictor function as follows:

f(i)=𝜷⋅𝐱i using the notation for a dot product between two vectors.

Matrix Notation An equivalent form using matrix notation is as follows:

f(i)=𝜷T𝐱i=𝐱iT𝜷 where 𝜷 and 𝐱i are assumed to be a (p+1)-by-1 column vectors, 𝜷T is the matrix transpose of 𝜷 (so 𝜷T is a 1-by-(p+1) row vector), and 𝜷T𝐱i indicates matrix multiplication between the 1-by-(p+1) row vector and the (p+1)-by-1 column vector, producing a 1-by-1 matrix that is taken to be a scalar.

Linear regression An example of the usage of a linear predictor function is in linear regression, where each data point is associated with a continuous outcome yi, and the relationship written

yi=f(i)+εi=𝜷T𝐱i +εi, where εi is a disturbance term or error variable — an unobserved random variable that adds noise to the linear relationship between the dependent variable and predictor function.

Stacking In some models (standard linear regression, in particular), the equations for each of the data points i = 1, ..., n are stacked together and written in vector form as

𝐲=𝐗𝜷+𝜺, where

𝐲=(y1y2⋮yn),𝐗=(𝐱'1𝐱'2⋮𝐱'n)=(x11⋯x1px21⋯x2p⋮⋱⋮xn1⋯xnp),𝜷=(β1⋮βp),𝜺=(ε1ε2⋮εn). The matrix X is known as the design matrix and encodes all known information about the independent variables. The variables εi are random variables, which in standard linear regression are distributed according to a standard normal distribution; they express the influence of any unknown factors on the outcome. This makes it possible to find optimal coefficients through the method of least squares using simple matrix operations. In particular, the optimal coefficients 𝜷̂ as estimated by least squares can be written as follows:

𝜷̂=(XTX)−1XT𝐲. The matrix (XTX)−1XT is known as the Moore–Penrose pseudoinverse of X. The use of the matrix inverse in this formula requires that X is of full rank, i.e. there is not perfect multicollinearity among different explanatory variables (i.e. no explanatory variable can be perfectly predicted from the others). In such cases, the singular value decomposition can be used to compute the pseudoinverse.

Preprocessing of explanatory variables When a fixed set of nonlinear functions are used to transform the value(s) of a data point, these functions are known as basis functions. An example is polynomial regression, which uses a linear predictor function to fit an arbitrary degree polynomial relationship (up to a given order) between two sets of data points (i.e. a single real-valued explanatory variable and a related real-valued dependent variable), by adding multiple explanatory variables corresponding to various powers of the existing explanatory variable. Mathematically, the form looks like this:

yi=β0+β1xi+β2xi2+⋯+βpxip. In this case, for each data point i, a set of explanatory variables is created as follows:

(xi1=xi,xi2=xi2,…,xip=xip) and then standard linear regression is run. The basis functions in this example would be

𝝓(x)=(ϕ1(x),ϕ2(x),…,ϕp(x))=(x,x2,…,xp). This example shows that a linear predictor function can actually be much more powerful than it first appears: It only really needs to be linear in the coefficients. All sorts of non-linear functions of the explanatory variables can be fit by the model. There is no particular need for the inputs to basis functions to be univariate or single-dimensional (or their outputs, for that matter, although in such a case, a K-dimensional output value is likely to be treated as K separate scalar-output basis functions). An example of this is radial basis functions (RBF's), which compute some transformed version of the distance to some fixed point:

ϕ(𝐱;𝐜)=ϕ(||𝐱−𝐜||)=ϕ((x1−c1)2+…+(xK−cK)2) An example is the Gaussian RBF, which has the same functional form as the normal distribution:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Linear predictor function

Start with the simplest possible case. Write down what Linear predictor function 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 Linear predictor function 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 Linear predictor function 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 Linear predictor function

In research
Linear predictor function 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 Linear predictor function 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
Linear predictor function is common in secondary-school and first-year university syllabi. It links to neighbouring topics Machine learning, Regression analysis, so understanding it makes those chapters shorter.
In everyday life
Look for Linear predictor function 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 “Linear predictor function” →

How to study Linear predictor function in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Linear predictor function 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 Linear predictor function out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Linear predictor function in simple terms?

In statistics and in machine learning, a linear predictor function is a linear function (linear combination) of a set of coefficients and explanatory variables (independent variables), whose value is used to predict the outcome of a dependent variable. This sort of function usually comes in linear…

Why does Linear predictor function 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 Linear predictor function?

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 Linear predictor function.

Tags

  • Machine learning
  • Regression analysis

Keep exploring