Concepts / Feature Mappings for Polynomial Classifiers

Feature Mappings for Polynomial Classifiers

In the transformed feature space, polynomial classification is therefore a halfspace classification problem.

  • Programming

The Compression Question

Suppose a training set is realizable: some classifier can label every training example correctly. A compression scheme asks whether we can keep only a smaller representation of that training set and still reconstruct a predictor that makes zero mistakes on the original examples. The important issue is therefore not whether every example is stored. It is whether the retained representation contains enough information for reconstruction without training errors.

Definition

A compression scheme uses an algorithm A to select or create a smaller representation from a training set. A reconstruction function B then turns that representation into a predictor. In the realizable case, the reconstructed predictor must have zero training loss on the original training set.

Training setlabeled examplesCompressedrepresentationsmaller descriptionReconstructedpredictorzero training lossA selects or createsB reconstructs
What information is retained during compression, and how does it become a zero-training-loss predictor?

Extremal Examples and Separation

For linearly separable data, a geometric compression construction can retain selected positive examples that support a separating direction. The construction uses two positive examples per dimension, so its compression size is k = 2d. These examples are useful because the separating classifier is determined through the geometry of the relevant positive examples rather than by storing the entire training set.

The geometric argument uses the convex hull of the relevant positive examples. When that convex hull does not contain the origin, the point in the convex hull closest to the origin provides a route to a separating direction. Reconstruction therefore depends on the geometry represented by the selected examples. The compressed examples are not arbitrary storage; they support the separation argument.

Positive example Aselected exampleConvex hullof relevant positivesSeparating directionreconstructed from geometryPositive example Bselected examplePositive example Cselected examplecontributescontributescontributessupports
Which positive examples support reconstruction of a separating direction?
Worked example

Counting a Geometric Compression

A linearly separable data set has d dimensions. Apply the extremal-example construction that uses two positive examples per dimension.

  1. 1
    Count the contribution of one dimension

    The construction retains two positive examples for each dimension.

  2. 2
    Multiply by the number of dimensions

    Across d dimensions, the total number of retained examples is two times d.

  3. 3
    Interpret the result

    The retained examples form a compressed representation from which a separating direction can be reconstructed through the geometric argument.

Result

The compression size is k = 2d.

Perceptron Updates as Compression

The Perceptron gives a second route to compression. It searches for a separating hyperplane and updates when an example is not correctly handled by the current separator. If the training set is separated with margin γ, the Perceptron makes at most 1/γ² updates before reaching a solution with no mistakes on the entire training set.

The examples involved in those updates can serve as a compressed description. Because there are no more than 1/γ² updates, the resulting compression size k is no larger than 1/γ². This connects an algorithmic progress bound directly to the amount of information needed for reconstruction.

Initial separatormay make mistakesMistake exampletriggers updateUpdate examplescompressed description1 divided by γsquaredmaximum updatesSeparating hyperplanezero training mistakesinspect exampleadd examplecannot exceedreconstruct or reach
How do update-triggering examples accumulate into a compressed set, and why does the update bound limit its size?
Worked example

Reading the Perceptron Bound

A realizable training set is separated with margin γ. What does the Perceptron guarantee tell us about a possible compressed representation?

  1. 1
    Use the margin condition

    The margin γ supplies the Perceptron update bound.

  2. 2
    Bound the number of updates

    The Perceptron makes at most 1/γ² updates before finding a separator with no training mistakes.

  3. 3
    Use update examples

    The examples involved in those updates can be retained as a compressed description.

Result

The compression size can be bounded by k no larger than 1/γ².

Polynomial Features as New Coordinates

A polynomial classifier may look nonlinear in the original input coordinates. The feature-mapping view changes the representation instead of changing the halfspace idea. Let ψ(x) contain all monomials of x up to degree r. Then the polynomial expression p(x) can be written as the inner product of a weight vector w with ψ(x). In the transformed feature space, polynomial classification is therefore a halfspace classification problem.

The transformed feature space has dimension d′ = O(dr). Consequently, compression can be analyzed as a halfspace compression problem in that higher-dimensional space. The key shift is to analyze the classifier using ψ(x), not directly using the original coordinates x.

Original example xoriginal coordinatesFeature map ψmonomials up to degree rFeature vector ψ(x)dimension d′ = O(d^r )Halfspace score〈w, ψ(x)〉transformproducesevaluate with w
How does a nonlinear polynomial boundary in the original space become a linear separator after a feature mapping?
Worked example

Changing the Classification View

A classifier is expressed by a polynomial p(x). Explain how to place it in the halfspace framework.

  1. 1
    Construct the representation

    Define ψ(x) to contain all monomials of x up to degree r.

  2. 2
    Rewrite the polynomial

    Express p(x) as the inner product of a weight vector w and the mapped feature vector ψ(x).

  3. 3
    Apply halfspace reasoning

    Analyze the classifier in the transformed feature space, whose dimension is d′ = O(dr).

Result

The polynomial classification problem becomes a halfspace classification problem in the feature representation ψ(x).

Choosing the Right Compression View

Compression routeRetained informationSize bound or countGeometric or algorithmic basis
Extremal-example constructionSelected positive examplesk = 2dConvex-hull geometry and a separating direction
Perceptron constructionExamples involved in updatesk no larger than 1/γ²Margin-based update bound
Polynomial feature mappingA halfspace compression representation in ψ(x)Analyzed in dimension d′ = O(dr)Polynomial classification rewritten as halfspace classification

Different representations support the same compression goal: reconstruct a predictor with zero training loss in the realizable case.

  • Common mistake

    Treating compression as ordinary data storage

    What it looks like

    Assuming that a compression scheme must preserve every original training example.

    Why it fails

    The purpose is to retain a smaller representation from which a predictor can be reconstructed.

    Do this instead

    Focus on whether reconstruction produces zero training loss on the original realizable data.

  • Common mistake

    Calling every positive example extremal

    What it looks like

    Assuming that all positive examples belong to the geometric compressed representation.

    Why it fails

    The construction uses selected positive examples, with two positive examples per dimension.

    Do this instead

    Track the selected examples that support the convex-hull and separating-direction argument.

  • Common mistake

    Using the Perceptron bound as an exact update count

    What it looks like

    Reading 1/γ² as the number of updates that always occurs.

    Why it fails

    The source gives it as an upper bound on the number of updates.

    Do this instead

    Interpret it as a maximum, and therefore as an upper bound on the compression size obtained from update examples.

  • Common mistake

    Saying that a polynomial classifier is linear in the original input space

    What it looks like

    Claiming that the original polynomial decision boundary is a halfspace in x.

    Why it fails

    The halfspace interpretation applies after mapping x to ψ(x).

    Do this instead

    State explicitly that the classifier is a halfspace in the transformed feature space.

Practice and Synthesis

MEDIUM

A realizable polynomial classification problem uses monomials up to degree r. Explain, in order, how you would reinterpret it as a halfspace problem, which dimension controls the halfspace analysis, and how a compression result for halfspaces could then be applied.

Hints
  • Begin by naming the feature map ψ(x).
  • State how p(x) is represented using w and ψ(x).
  • Use d′ = O(dr) for the transformed dimension.
  • Conclude by referring to halfspace compression in the transformed space.
MEDIUM

Compare the two direct compression constructions for linearly separable data: the extremal-example construction and the Perceptron construction. State what each retains and how its size is bounded.

Hints
  • The extremal-example construction uses two positive examples per dimension.
  • The Perceptron construction retains examples involved in updates.
  • The Perceptron update bound depends on the margin γ.

Key Takeaways

  • A compression scheme retains a smaller representation and reconstructs a predictor with zero training loss in the realizable case.
  • For linearly separable data, selected extremal positive examples can support reconstruction through convex-hull geometry; the stated construction uses k = 2d examples.
  • The Perceptron supplies another compression route: with margin γ, at most 1/γ² updates occur, so update examples give a compression size no larger than 1/γ².
  • Mapping x to ψ(x), where ψ(x) contains monomials up to degree r, turns polynomial classification into halfspace classification in dimension d′ = O(dr).

Related concepts

More concepts starting with F