AI Glossary / AI and machine learning / Advanced

Backfitting

Definition

Backfitting is an iterative method for fitting additive models: it cycles through the model's components, refitting each one to the residuals left by the others until the whole fit settles.

What it means

Some models are sums of simple parts, for example sales as a function of price plus a function of advertising plus a function of season. These are called additive models, and each part can be a flexible curve.

Fitting all the parts at once is hard. Backfitting does it one part at a time. Hold the others fixed, fit one part to what remains unexplained, then move to the next, and keep cycling.

Each pass improves the overall fit. The process stops when the components stop changing meaningfully, a state called convergence.

The method is a core idea behind generalized additive models, which are valued because each component can be plotted and read, showing how one input affects the outcome with the others held steady.

For a business, backfitting is a behind-the-scenes algorithm: you rarely run it by hand, but it explains how tools produce readable curves for effects like price, tenure or season.

The idea generalizes beyond smooth curves. Any model built from additive parts can in principle be fitted by cycling through the parts, and the same cycling idea appears in several classic fitting algorithms.

How it works

Start with an initial guess for every component, often zero or a simple average. Compute the residuals: the gap between the actual outcomes and the current combined prediction.

Pick the first component. Add its current contribution back into the residuals, so they show what that component should explain, then fit a smoother or simple curve to them using that component's input.

Move to the second component and do the same, using the freshly updated first one. Continue through all components to complete one cycle.

Repeat cycles until changes are tiny. Smoothness settings control how wiggly each curve may become, and a sensible limit prevents the model from chasing noise.

Convergence is usually quick in practice, often a handful of cycles, because each part accounts for a different slice of the pattern.

Three practical examples

  • Demand modeling: separate smooth effects for price, temperature and day of week added together.
  • Insurance or risk: effects of age, tenure and region each shown as a readable curve.
  • Medical or social research: how an outcome changes with age or dose while adjusting for other variables.

Think of it this way

Think of a team of editors each responsible for one section of a report. Each reads the whole draft, fixes what is wrong in their section given everyone else's current text, and passes it on. After several rounds, the report stops changing.

The limit: if two sections overlap in content, editors can pass changes back and forth, and the result depends on how that overlap is handled.

Worked example

fitting price and season effects in turn

Suppose a shop models weekly sales as a base level plus a price effect plus a season effect. The price effect is a curve, and so is the season effect.

Round one: assume the season effect is zero and fit the price curve to the sales. Then compute what is left and fit the season curve to that. Round two: refit price on the sales minus the season curve, and so on.

After a handful of rounds, neither curve changes noticeably. The shop plots each, and sees that sales drop sharply above a certain price and rise before holidays. The story is illustrative.

The owner treats the curves as descriptions of past data, and tests a price change on a small range before relying on them.

Illustrative case study

A fictional energy retailer models household usage as an additive sum of temperature, time of day and household size effects. Backfitting produces readable curves for each.

Analysts find that the temperature curve is flat in mild weather and climbs at both extremes, informing how they plan staffing for peak periods. A manager asks why a simple straight-line model was not enough, and the curves provide the answer.

The invented lesson: additive models fitted this way balance flexibility and clarity, which is useful when decisions need explanation.

Common misconceptions and mistakes

  • Backfitting is about backups. It has nothing to do with data backup; it fits models by cycling through components.
  • It captures interactions between inputs. Plain additive models do not, unless interactions are added explicitly.
  • It is obsolete. Variants remain behind modern tools for generalized additive models.

Business use

You will meet backfitting inside tools that fit additive or generalized additive models. Ask for the plotted component curves, not just overall accuracy.

Check that each curve makes business sense, and be cautious where data is thin, since the curve there is mostly the smoother's guess.

People also ask

Is backfitting a type of gradient descent?

No, but it is similar in spirit to coordinate-wise methods that update one part at a time.

When does it stop?

When the components stop changing by more than a small tolerance.

Why additive models?

They are flexible yet readable, because each effect can be plotted separately.

Check your understanding

In backfitting, what does each component get fitted to?

Answer: The residuals that remain after subtracting the current contributions of all the other components, so each part explains what the rest has not.

Related terms

  • Additive model
  • Residual
  • Smoothing
  • Convergence
  • generalised additive model
  • regression

Learn next

AI for Business Owners helps you judge which models give explanations you can act on: https://aiforbusinessandlife.com/academy/ai-for-business-owners. [C2]

More in AI and machine learning

  • Auxiliary Tasks - Auxiliary tasks are extra learning tasks, related to the main one, that a model is trained on at the same time, to help it learn representations that...
  • Averaged one-dependence estimators - Averaged one-dependence estimators, or AODE, is a probabilistic classification method that averages a constrained collection of models allowing limited...
  • Axis-aligned condition - An axis-aligned condition is a test in a decision tree that looks at one feature only, such as age is below 30 or temperature is above 25, splitting the...
  • Bag of words - A bag of words is a way of representing text by counting which words appear in it and how often, ignoring grammar and word order.
  • Bagging - Bagging, short for bootstrap aggregating, is an ensemble method that trains many models on different random resamples of the training data and combines...
  • Ball tree - A ball tree is a data structure that organizes points into nested regions defined by a center and a radius.

Sources

[S13] Minka, Statistical Learning/Pattern Recognition Glossary. Full URLs are in the source ledger. Verified 11 October 2026.

Previous: Backed-up value Next: Background knowledge

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer