Concepts / Compression Bounds in Machine Learning

Compression Bounds in Machine Learning

Axis aligned rectangles have all sides parallel to the axes and form an uncountable infinite class.

  • Programming

Why Boundary Examples Matter

A learning problem may involve a large collection of positive examples, but the reconstructed hypothesis does not always need to retain every example. For axis aligned rectangles, the important examples are the ones that determine the outer limits of the positive region. The compression scheme keeps those boundary-defining examples, then reconstructs a rectangle from them.

This gives the topic its central idea: the hypothesis class can be uncountably infinite, yet a particular sample can be represented by a finite collection of carefully selected examples. Algorithm A performs the selection, and function B performs the reconstruction.

Axis Aligned Rectangle Class

An axis aligned rectangle is a rectangle whose sides are parallel to the coordinate axes. Its boundaries are therefore aligned with the axes rather than tilted relative to them.

The class of axis aligned rectangles is uncountable and infinite. The reason is that rectangle boundaries can vary along the coordinate axes, producing continuously many possible boundary choices. The compression result is therefore not based on listing every rectangle in the class. Instead, it shows that a sample can be summarized by a small number of selected positive examples.

choose positionschoose different positionsRectangle 1one boundary choiceAxis boundariesvary continuouslyRectangle 2another boundary choice
What changes when the boundaries move along the coordinate axes, and why does this create uncountably many possible rectangles?

Algorithm A Selects Extremes

Algorithm A examines the positive examples dimension by dimension. In each dimension, it selects two positive examples with extremal values: one associated with the minimum value and one associated with the maximum value. These examples preserve the outer limits that the reconstructed rectangle must respect.

Selecting Boundary Examples in Two Dimensions

Consider a generated two-dimensional collection of positive examples with coordinate values. Apply the stated selection rule by choosing examples at the minimum and maximum value in each dimension.

First dimension: Compare the positive examples by their first coordinate. Retain an example with the minimum first-coordinate value and an example with the maximum first-coordinate value.

Second dimension: Compare the same positive examples by their second coordinate. Retain an example with the minimum second-coordinate value and an example with the maximum second-coordinate value.

Combine selections: The retained collection consists of the examples selected for these extremal positions. A single example may serve as an extremal example for more than one dimension, but the stated compression bound counts two selections per dimension.

In two dimensions, the scheme has a compression size of k = 2d = 4. The retained examples are the positive examples used to define the coordinate-wise outer limits.

retainretainretainretainDimension 1 minimumselected positive exampleCompressed sampleretained boundary examplesDimension 1 maximumselected positive exampleDimension 2 minimumselected positive exampleDimension 2 maximumselected positive example
Which positive examples are retained when the minimum and maximum coordinate value are selected in each dimension?

Function B Reconstructs the Rectangle

Function B receives the examples retained by algorithm A. It returns the minimal enclosing rectangle of those selected examples. Minimal enclosing means that the returned axis aligned rectangle contains the selected examples while using the smallest coordinate-wise boundaries determined by them.

The two parts of the scheme have different responsibilities. Algorithm A decides which examples are worth keeping. Function B turns those retained examples into one rectangle. The reconstruction works because the retained examples preserve the minimum and maximum limits in every dimension.

function BSelected examplescoordinate-wise extremesMinimal rectangleencloses selected examples
How do the selected extremal examples determine the smallest axis aligned rectangle containing the positive examples?

Counting the Compression Size

k = 2d

The compression size is determined by the number of dimensions. In each of the d dimensions, algorithm A makes two extremal selections: one for the minimum and one for the maximum. Therefore the total compression size is k = 2d.

2 selections2 selections2 selectionsDimension 1minimum and maximumk = 2dcompression sizeDimension 2minimum and maximumDimension dminimum and maximum
How does each of the d dimensions contribute two boundary selections, producing a compression size of 2d?
Number of dimensionsSelections per dimensionCompression size
d22d
224
326

Illustrations of the rule k = 2d. The general result is the source-grounded statement; the numerical rows are generated applications of that rule.

Realizable Samples and Zero Loss

The source gives the result L_S(B(A(S))) = 0 for k = 2d in the realizable case. Here, A selects the extremal positive examples, and B returns their minimal enclosing rectangle. A zero value for the stated loss on S means that the reconstructed hypothesis makes no error on the sample S under the realizable-case assumption.

This result should be read carefully. It concerns the loss on the sample S in the realizable case. It does not say that every possible example outside the stated sample is automatically classified without error.

algorithm Afunction Bon SRealizable sample Spositive examplesL_S = 0no error on SExtremal examplesA(S)ReconstructedrectangleB(A(S))
Why does the rectangle reconstructed from the compressed examples have zero stated loss on S when the case is realizable?

Common Misreadings

  • Treating an uncountable class as if it could not have a finite compression scheme.

    The size of the hypothesis class and the number of examples retained for one sample are different ideas.

    Fix: The class can be uncountable while the stated scheme retains k = 2d examples for a sample.

  • Selecting only one extremal example per dimension.

    The scheme uses two extremal choices in every dimension.

    Fix: Account for both the minimum and maximum value in each dimension.

  • Confusing algorithm A with function B.

    The source assigns selection to A and reconstruction to B.

    Fix: Describe A as selecting positive examples and B as returning their minimal enclosing rectangle.

  • Interpreting zero loss as a guarantee about every possible future example.

    The stated result concerns the loss on S in the realizable case.

    Fix: State that the reconstructed hypothesis has zero stated loss on the sample S under the realizable assumption.

Check Your Understanding

EASY

A sample is described in d = 5 dimensions. According to the stated compression scheme, how many selections are counted by the compression size? Then identify the responsibility of algorithm A and the responsibility of function B.

Hints
  • Use two selections for each dimension.
  • Apply k = 2d.
  • A selects extremal positive examples; B reconstructs the minimal enclosing rectangle.

What do you think happens?

If the sample is realizable and the scheme uses k = 2d, what does the source result say about L_S(B(A(S)))?

  • It is zero on S
  • It must equal 2d
  • It is undefined because the class is infinite
Reveal answer

Answer: It is zero on S.

The source states that for k = 2d, in the realizable case, L_S(B(A(S))) = 0. This refers to the stated loss on the sample S.

Key Takeaways

  1. Axis aligned rectangles have sides parallel to the coordinate axes and form an uncountable infinite class.
  2. Algorithm A selects positive examples at extremal coordinate values: a minimum and a maximum in each dimension.
  3. Function B returns the minimal enclosing rectangle of the selected examples.
  4. With d dimensions, the compression size is k = 2d because there are two extremal selections per dimension.
  5. In the realizable case, the source states that L_S(B(A(S))) = 0, meaning zero stated loss on the sample S.

Key Takeaways

  • An axis aligned rectangle is bounded by sides parallel to the coordinate axes.
  • The rectangle class is uncountably infinite, but a sample can still be compressed using boundary-defining positive examples.
  • Algorithm A selects minimum and maximum coordinate examples in each dimension.
  • Function B reconstructs the minimal enclosing rectangle, giving compression size k = 2d.
  • For a realizable sample, the stated result is L_S(B(A(S))) = 0.