AI Glossary / AI and machine learning / Advanced

Quadratic classifier

Definition

A quadratic classifier assigns categories using a decision function that includes second-degree terms, such as squared features and products of pairs of features. Its decision boundary can therefore curve in the original feature space. Quadratic discriminant analysis is an important example, but the broader term does not refer to that method alone.

What it means

A straight line or flat boundary cannot express every useful separation between groups. A quadratic boundary can describe patterns such as an elliptical region or differences in how features interact. This added flexibility can help when class structure supports it, but it also creates more quantities to estimate. For business readers, the important trade-off is whether the curved boundary captures a repeatable pattern or merely follows accidental details of the training sample. Greater flexibility is a modeling choice, not an automatic improvement.

How it works

One approach directly uses a score containing constant, linear and quadratic feature terms, then chooses a class from that score. In quadratic discriminant analysis, each class is modeled with a Gaussian distribution having its own mean and covariance matrix. Comparing the resulting class scores generally produces quadratic boundaries. The class-specific covariance captures differences in spread and feature relationships. A shared covariance assumption instead leads to linear discriminant analysis. Training and evaluation must account for the available sample size, class balance and the reliability of covariance or coefficient estimates.

Three practical examples

  • A hypothetical quality-control system distinguishes a central region of acceptable sensor readings from observations outside that region, testing whether a curved rule is appropriate.
  • An analyst compares QDA with a linear model when two labeled groups have different patterns of spread across measured features.
  • A teaching tool displays how including the product of two features changes a classifier's decision boundary, helping learners distinguish interaction effects from separate linear contributions.

Think of it this way

Think of drawing a curved fence instead of a straight divider on a map. The fence can surround a region or follow more complicated geometry. It still represents a rule chosen from evidence, not a guarantee that everything on one side truly belongs together. Higher-dimensional quadratic boundaries are harder to picture than a fence on paper.

Worked example

Consider a simple classifier with score s(x,y) = x² + y² − 9. Label a point “inside” when the score is zero or negative and “outside” when it is positive. For (1,2), the score is 1 + 4 − 9 = −4, so the label is inside. For (3,2), it is 9 + 4 − 9 = 4, so the label is outside. The boundary is a circle of radius three. This hand-specified example illustrates quadratic geometry. It is not a fitted QDA model and does not establish that a circular threshold is suitable for a real monitoring task.

Illustrative case study

A fictional packaging facility studies two sensor measurements associated with independently inspected product batches. The team compares a linear classifier with a quadratic alternative using later production runs for evaluation. The more flexible model reduces some errors but performs poorly on a rarely observed operating condition. Engineers investigate whether this reflects limited training coverage or a changed process, and retain a review route for that condition. They choose the model based on error costs, stability and maintenance effort. The case illustrates why an attractive curved boundary must be evaluated against future operating data, not just a plot of training points.

Common misconceptions and mistakes

Quadratic does not mean the classifier has only two features. It refers to polynomial degree. A quadratic classifier is not the same as quadratic regression, which ordinarily predicts a numerical response. QDA is one way to obtain a quadratic boundary, but other training methods can use quadratic features. More parameters can make estimates unstable when data are scarce or features are strongly dependent. A model-generated probability also needs evaluation; a mathematically valid formula can still be poorly calibrated when its distributional assumptions are unsuitable.

Business use

Quadratic classifiers are useful candidates when linear models miss a stable pattern and the available data can support the added complexity. Compare them with both simple baselines and other suitable nonlinear methods. Track errors for important operating groups, and choose thresholds according to the decision's consequences. For QDA, investigate the amount of data per class and whether regularization is needed. Maintain a clear description of the input features and training range so users do not assume the model remains reliable under substantially different conditions.

People also ask

Does QDA always produce a visibly curved boundary?

Its general form is quadratic, but special parameter relationships can simplify the boundary.

Can a linear model use squared features?

Yes. It can be linear in its fitted coefficients while defining a nonlinear boundary in the original inputs.

Is QDA always better than LDA?

No. The additional flexibility can increase estimation error when data are limited.

Check your understanding

For the example rule, which label does (0,3) receive?

Answer: Its score is zero, so it receives inside under the stated tie rule.

Why should that tie rule be explicit?

Answer: Boundary cases need a defined decision. Explain why a curved boundary and a probabilistic interpretation are separate properties: the former describes geometry, while the latter requires a model for uncertainty.

Related terms

  • Linear discriminant analysis
  • Covariance matrix
  • Decision boundary
  • Regularization
  • Quadratic discriminant analysis
  • polynomial features

Learn next

Compare LDA and QDA on labeled data with different class spreads. Then explore how feature products create interactions. Study validation, covariance regularization and probability calibration before treating a flexible classifier as operationally reliable.

  • Labeled data
  • Probability calibration
  • Regularization

More in AI and machine learning

  • Pure function - A pure function is a function whose output depends only on its inputs and which has no side effects: given the same inputs it always returns the same result...
  • PVLV - PVLV stands for primary value and learned value.
  • Q-function - A Q-function estimates how good it is to take a particular action in a particular situation, measured as the total reward an agent can expect to collect...
  • Quadratic unconstrained binary optimization - Quadratic unconstrained binary optimization, usually abbreviated QUBO, is a problem formulation that minimizes a quadratic objective over variables...
  • Quantum artificial life - Quantum artificial life is a research area that constructs quantum models inspired by processes associated with living systems, such as inheritance...
  • Query-level feature - A query-level feature is a measurable property of a search query, rather than a property of an individual candidate document or of the match between the two.

Sources

Scikit-learn, Linear and Quadratic Discriminant Analysis: https://scikit-learn.org/stable/modules/lda_qda.html Scikit-learn, covariance-ellipsoid comparison example: https://scikit-learn.org/stable/auto_examples/classification/plot_lda_qda.html The circular rule and packaging scenario are original illustrations and do not report a deployed system's performance. Independent review consulted the official mathematical formulation of LDA and QDA, including Gaussian class models and class-specific covariance. The circle example and boundary tie rule were independently checked and remain explicitly separate from fitted QDA.

Previous: Q-value (statistics) Next: Quadratic function

  • 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