AI Glossary / AI and machine learning / Intermediate
Linear predictor function
Definition
A linear predictor function forms a score by adding weighted input features, usually with an intercept. It commonly has the form eta = b + w1x1 + ... + wpxp and is a building block of linear regression, generalized linear models and many classifiers.
What it means
Each feature contributes its value multiplied by a coefficient. The intercept supplies a baseline when the included feature values are zero. The resulting score may be used directly as a prediction or passed through another function.
In ordinary linear regression, the linear predictor can represent the predicted mean response. In logistic regression, it represents log-odds, and a logistic transformation converts it to a probability. Calling the score a probability without that transformation would be a mistake.
“Linear” refers to the combination of coefficients and chosen features. A model can include a transformed feature such as x squared and still be linear in its coefficients. It can therefore describe a curved relationship in the original input while retaining a linear predictor over its feature representation.
How it works
A modeling process defines the features and estimates their coefficients from training data. Estimation depends on the model's loss, probability assumptions and any regularization. Once fitted, the system calculates the weighted sum for a new observation.
The interpretation of a coefficient depends on the feature definition and the other included terms. If an interaction is present, the effect associated with one original variable can depend on another. Units and scaling also matter: changing a feature from meters to centimeters changes the numerical coefficient needed for the same predictions.
In a generalized linear model, a link function relates the conditional mean to the linear predictor. Prediction on the response scale uses the inverse link. Good practice distinguishes the score, transformed prediction and observed outcome, and checks performance outside the training sample rather than assuming a simple formula is automatically reliable.
Three practical examples
1. A planning model predicts a mean workload from the number of incoming requests and a day-type indicator.
2. A logistic classifier computes a weighted score and converts it into an estimated probability of a defined event.
3. An analyst includes a squared temperature feature to model curvature while keeping a predictor that is linear in its fitted coefficients.
Think of it this way
Think of a recipe in which measured ingredients are multiplied by specified amounts and added to create a base mixture. A later step may transform that mixture into the final output. The limit is that model coefficients are estimated relationships, not necessarily causal effects or physically meaningful recipe proportions.
Worked example
Suppose a fictional model uses eta = -2 + 0.5x1 + 0.3x2. For x1 = 4 and x2 = 2, eta is -2 + 2 + 0.6 = 0.6.
If this is a logistic regression, the estimated probability is 1 / (1 + exp(-0.6)), approximately 0.646. The linear predictor 0.6 is a log-odds score, while 0.646 is the corresponding probability under the model.
If the same weighted sum belonged to a different model with an identity link, its interpretation would differ. The formula alone does not specify the outcome scale or the model's reliability.
Illustrative case study
A fictional support-planning team exports a logistic model's raw scores into a dashboard and labels them “probability.” Some values are negative or greater than one, confusing users.
The analysts identify the missing inverse-link transformation and correct the display. They also evaluate probability calibration on later examples and document the feature definitions used to compute the score.
The case illustrates that a linear predictor is often an intermediate quantity. Correct arithmetic is not enough if the result is labeled on the wrong scale or if users assume a score has a probabilistic interpretation that the model does not provide.
Common misconceptions and mistakes
- A linear predictor is always the final prediction. It may require an inverse-link transformation.
- Linear models cannot represent any curved relationship. Transformed features can introduce curvature in the original variables.
- A coefficient proves a causal effect. It describes a fitted association under the model unless a separate causal argument supports more.
Business use
Linear predictors are common in forecasting, classification and decision-support models because they are computationally simple and can be inspected. Their usefulness depends on appropriate features, assumptions and evaluation.
Ask what the score represents and how it is converted to the quantity shown to users. Keep units and preprocessing consistent between training and deployment. Review interactions and transformations before interpreting coefficients. Compare predictions with a practical baseline and monitor changing conditions; an understandable weighted sum can still be systematically wrong.
People also ask
What is the intercept?
It is the additive baseline term in the predictor, interpreted at zero values of the included features.
Can a linear predictor include x squared?
Yes. It remains linear in the coefficient multiplying that transformed feature.
Is a logistic-regression score already a probability?
No. The inverse-logit transformation maps the linear predictor to a probability.
Check your understanding
A logistic model returns eta = 2. Should a dashboard display this as a 200% event probability?
Answer: No. Eta is a log-odds score. Applying the logistic function gives approximately 0.881, or 88.1%, subject to the model's validity.
Related terms
- Linear regression
- Generalized linear model
- Intercept
- Logistic regression
- coefficient
- link function
- feature transformation
Learn next
Read generalized linear models and link functions. Calculate a weighted score by hand and explicitly label both its scale and the scale after any inverse-link transformation.
More in AI and machine learning
- Linde - Buzo - Gray algorithm - The Linde - Buzo - Gray algorithm, or LBG algorithm, is an iterative method for designing a vector quantizer.
- Linear - Linear describes a relationship that follows a straight line: double the input and you double the output's contribution, with no curves, thresholds or...
- Linear Dynamical System - A Linear Dynamical System is a model for a hidden state that evolves smoothly over time, with the next state a linear function of the current one plus...
- Linear separability - Linear separability is the property that two classes of points can be separated perfectly by a linear decision boundary in the chosen feature space.
- Local case-control sampling - Local case-control sampling is a subsampling method for fitting logistic regression to large datasets.
- Local tangent space alignment - Local tangent space alignment, or LTSA, is a nonlinear dimensionality-reduction method that estimates local tangent spaces around data points and aligns...
Sources
Statsmodels, official Generalized Linear Models documentation: https://www.statsmodels.org/stable/glm.html. Official GLM prediction documentation distinguishing linear predictor and mean response: https://www.statsmodels.org/v0.14.1/generated/statsmodels.genmod.generalized_linear_model.GLM.predict.html. All coefficients and support-team examples are invented.
Previous: Linear predictive coding Next: Linear probing