Regression Methods: Complete Guide to Choosing the Right Model
By MCP Analytics Team | Published , updated
Regression is the workhorse of predictive analytics. Whether you are forecasting revenue, estimating customer lifetime value, or identifying which features drive conversion, some form of regression is a useful starting point for many prediction questions, depending on the outcome and the shape of the relationship. The challenge is not whether to use regression -- it is which regression to use. Pick ordinary least squares when your features are not strongly correlated and you want simple, readable coefficients. When correlated features make the coefficients unstable, Ridge shrinks them toward each other. Pick Lasso when you want the model to drop weak features, and remember it may zero out variables you care about.
This guide maps regression methods to the problems they suit. Each section says when a method fits and links to its own guide. The example below compares OLS, Ridge, and Lasso on made-up data. If you already know your problem type, jump to the comparison table. If you are starting from scratch, follow the decision flowchart at the bottom.
Find the method for your question
Start with the question you are asking. Each guide says when its method does not fit.
| Your question | Method | Page |
|---|---|---|
| How does an outcome change as one or more inputs change? | Linear regression (OLS) | Read the guide |
| My inputs move together and the weights swing from sample to sample. | Ridge regression | Read the guide |
| I have many inputs and want some dropped from the model. | Lasso regression | Read the guide |
| My inputs are related and I still want some dropped. | Elastic Net | Read the guide |
| The outcome is yes or no. | Logistic regression | Read the guide |
| The relationship between input and outcome bends. | Polynomial regression | Read the guide |
| I care about the median or another point of the outcome, not only the average. | Quantile regression | Read the guide |
| The outcome is a count with more spread than a simple count model allows. | Negative binomial regression | Read the guide |
Worked Example: OLS, Ridge and Lasso When Two Inputs Move Together
This example shows OLS, Ridge and Lasso only, and only on made-up data. It says nothing about logistic, polynomial, quantile or negative binomial regression, and it does not rank the methods on real data. Each method has its own guide: linear regression (OLS), Ridge and Lasso. Ridge and Lasso were introduced by Hoerl and Kennard (1970) and Tibshirani (1996); see Sources below.
Question: When two inputs track each other, how do OLS, Ridge and Lasso compare on test error and on the weights they give each input? Test RMSE is the usual size of a guess error on rows the model did not see. Lower is better.
Inputs: Simulated data, seed 42, repeated 500 times. Each repeat makes 200 rows with two inputs, x1 and x2, where x2 closely tracks x1. The outcome is y = 3 * x1 + 3 * x2 plus random noise with SD 0.5. Each repeat fits on 160 rows and scores on 40 rows.
Method: Fit OLS, Ridge with alpha 1 and Lasso with alpha 0.1 on the same rows. Record the test RMSE, the x1 weight, and the sum of the two weights.
import numpy as np
from sklearn.linear_model import LinearRegression, Ridge, Lasso
SEED = 42
runs = 500
n = 200
rng = np.random.default_rng(SEED)
models = {
"OLS": lambda: LinearRegression(),
"Ridge (alpha=1)": lambda: Ridge(alpha=1.0),
"Lasso (alpha=0.1)": lambda: Lasso(alpha=0.1, max_iter=10000),
}
rmse = {k: [] for k in models}
coef1 = {k: [] for k in models}
coef_sum = {k: [] for k in models}
for _ in range(runs):
x1 = rng.normal(size=n)
x2 = 0.95 * x1 + rng.normal(scale=0.15, size=n)
y = 3.0 * x1 + 3.0 * x2 + rng.normal(scale=0.5, size=n)
X = np.column_stack([x1, x2])
for name, make in models.items():
m = make().fit(X[:160], y[:160])
err = y[160:] - m.predict(X[160:])
rmse[name].append(np.sqrt(np.mean(err ** 2)))
coef1[name].append(m.coef_[0])
coef_sum[name].append(m.coef_.sum())
print(f"Simulated data, seed {SEED}; {runs} repeats of: 200 rows, "
"x2 closely tracks x1, y = 3*x1 + 3*x2 + noise (SD 0.5)")
print("Each repeat fits on 160 rows and scores on 40 rows.")
print("Model | mean test RMSE | SD of x1 weight across repeats | "
"mean of (x1 + x2) weights")
for name in models:
print(f"{name} | {np.mean(rmse[name]):.3f} | "
f"{np.std(coef1[name]):.3f} | {np.mean(coef_sum[name]):.3f}")
print("True weights: x1 = 3, x2 = 3, sum = 6")
Simulated data, seed 42; 500 repeats of: 200 rows, x2 closely tracks x1, y = 3*x1 + 3*x2 + noise (SD 0.5)
Each repeat fits on 160 rows and scores on 40 rows.
Model | mean test RMSE | SD of x1 weight across repeats | mean of (x1 + x2) weights
OLS | 0.501 | 0.256 | 6.001
Ridge (alpha=1) | 0.501 | 0.166 | 5.981
Lasso (alpha=0.1) | 0.514 | 0.263 | 5.887
True weights: x1 = 3, x2 = 3, sum = 6
Result: All three models predict about equally well: mean test RMSE 0.501 for OLS, 0.501 for Ridge and 0.514 for Lasso, against a built-in noise SD of 0.5. OLS and Ridge are tied; Lasso is a little higher. The sum of the two weights stays near the built-in 6 (6.001, 5.981, 5.887). What changes is the split between the two weights: the x1 weight swings by an SD of 0.26 across repeats for OLS, 0.17 for Ridge and 0.26 for Lasso. Lasso's sum sits below 6 because its penalty shrinks the weights.
Limit: The inputs were built to track each other and both true weights were set at 3, so this pattern is by construction. It shows what correlated inputs do to the weights. It does not show which method is better on real data.
Sources
- James G, Witten D, Hastie T, Tibshirani R. An Introduction to Statistical Learning, 2nd ed. statlearning.com. Covers: linear regression, ridge and lasso.
- Hoerl A, Kennard R (1970). Ridge Regression: Biased Estimation for Nonorthogonal Problems. Technometrics. doi:10.1080/00401706.1970.10488634. Covers: who introduced ridge regression and when.
- Tibshirani R (1996). Regression Shrinkage and Selection Via the Lasso. Journal of the Royal Statistical Society Series B. doi:10.1111/j.2517-6161.1996.tb02080.x. Covers: who introduced the lasso and when.
- Zou H, Hastie T (2005). Regularization and Variable Selection Via the Elastic Net. Journal of the Royal Statistical Society Series B. doi:10.1111/j.1467-9868.2005.00503.x. Covers: who introduced the elastic net and when.
- Cox D (1958). The Regression Analysis of Binary Sequences. Journal of the Royal Statistical Society Series B. doi:10.1111/j.2517-6161.1958.tb00292.x. Covers: who described logistic regression for binary outcomes and when.
- Koenker R, Bassett G (1978). Regression Quantiles. Econometrica. doi:10.2307/1913643. Covers: who introduced quantile regression and when.
- Lawless JF (1987). Negative binomial and mixed Poisson regression. Canadian Journal of Statistics. doi:10.2307/3314912. Covers: who wrote on negative binomial regression and when.
Quick Comparison
| Method | Best For | Key Feature | Guide |
|---|---|---|---|
| Linear Regression | Baseline predictions, interpretable models | Closed-form solution, no tuning required | Full guide |
| Ridge Regression | Multicollinearity, many correlated features | L2 penalty shrinks coefficients without eliminating them | Full guide |
| Lasso Regression | Feature selection, sparse models | L1 penalty can set some coefficients to exactly zero | Full guide |
| Elastic Net | Correlated features when you also need sparsity | Combines L1 + L2, handles grouped correlations | Full guide |
| Logistic Regression | Binary classification, probability estimation | Gives a chance for each class | Full guide |
| Polynomial Regression | Nonlinear relationships with known curvature | Extends linear regression with polynomial terms | Full guide |
| Quantile Regression | Non-normal distributions, risk modeling | Models any percentile, not just the mean | Full guide |
| Negative Binomial | Count data with overdispersion | Handles variance > mean in count outcomes | Full guide |
When to Use Each Method
Linear Regression
Start here. If your target variable is continuous and your features have a roughly linear relationship with the outcome, ordinary least squares (OLS) gives you an interpretable baseline with zero hyperparameters to tune. It works best when you have more observations than features, low multicollinearity, and reasonably normal residuals. When the model starts overfitting or coefficients swing wildly, that is your signal to move to a regularized method. Read the full linear regression guide.
Ridge Regression
When features are correlated -- think revenue and units sold, or multiple demographic variables that move together -- OLS can produce unstable coefficients that change a lot with small data shifts. Ridge regression adds an L2 penalty that shrinks all coefficients toward zero proportionally, stabilizing predictions without dropping any features from the model. It is the right choice when you believe all features contribute some signal but need to tame variance. Read the full Ridge regression guide.
Lasso Regression
Lasso can help pick a small set of inputs. The data and penalty affect which ones it keeps (Tibshirani, 1996). Its L1 penalty can set some coefficients to exactly zero. Use it when you have many features and want a short list to look at. The tradeoff: when features are highly correlated, which one it keeps can change with the data. Read the full Lasso regression guide.
Elastic Net
Elastic Net combines the feature selection of Lasso with the stability of Ridge. It is one option when you have correlated feature groups and still want a sparse model (Zou and Hastie, 2005). The mixing parameter alpha controls the balance between L1 and L2 penalties -- set it closer to 1 for more sparsity, closer to 0 for more Ridge-like behavior. If you are unsure whether to use Ridge or Lasso, Elastic Net is one to try. Read the full Elastic Net guide.
Logistic Regression
Despite the name, logistic regression is a classification method. Use it when your target is binary (churn vs. retain, convert vs. bounce, fraud vs. legitimate). It gives a chance for each class (Cox, 1958). Check how close those chances are to real results before you rely on them. It is also the a common choice when stakeholders need an explanation, because its coefficients can be read directly. That explains the model's overall pattern, not exactly why any single prediction came out as it did. Read the full logistic regression guide.
Polynomial Regression
When the relationship between a feature and your target clearly curves -- diminishing returns on ad spend, U-shaped satisfaction scores, exponential growth phases -- polynomial regression captures it by adding squared, cubed, or higher-order terms to a linear model. Keep the degree low (2 or 3) unless you have strong theoretical reasons and plenty of data. Higher degrees fit training data beautifully and predict new data terribly. Read the full polynomial regression guide.
Quantile Regression
Standard regression predicts the mean. But if your data is skewed, has heavy tails, or you care about worst-case scenarios, the mean is not the right summary. Quantile regression lets you model any percentile -- the median for a central estimate, the 90th percentile for capacity planning, or the 10th percentile for risk floors. How it handles far-off points depends on the data and fit (Koenker and Bassett, 1978). Read the full quantile regression guide.
Negative Binomial Regression
When your target variable is a count -- support tickets per customer, website visits per session, defects per batch -- and the variance exceeds the mean (overdispersion), Poisson regression underestimates uncertainty. Negative binomial regression adds a dispersion parameter that allows for this extra variance (Lawless, 1987). Check for overdispersion first; if variance roughly equals the mean, plain Poisson is fine. Read the full negative binomial guide.
Decision Flowchart
Related Topics
Regression does not exist in isolation. These techniques complement regression modeling at different stages of the pipeline.
Regression in Business Applications
Regression is the mathematical engine behind marketing ROI measurement, budget allocation, and media mix modeling. See how these methods apply to real business problems:
Your turn
Bring your own data and the question you actually need answered.
MCP AnalyticsData science by email Send us your data and your question, and we will reply. ds@mcpanalytics.ai