Concepts / Geometric Classifiers

Geometric Classifiers

Shattering is an all-labelings requirement, not a one-labeling test.

  • Programming

The Boundary Between Four and Five

A geometric classifier assigns labels to points by placing a geometric shape in space. For axis-aligned rectangles, the decisive question is not how many rectangles exist. The important question is how flexibly rectangles can label a finite collection of points. Four points can be shattered, but no set of five points can be shattered. That boundary determines the VC-dimension.

The proof has two parts: construct one set of four points that supports every labeling, then show that every set of five points fails for at least one labeling.

Shattering Means Every Labeling

A point set is shattered by a hypothesis class when every possible assignment of binary labels to the points can be realized by some hypothesis in that class. For axis-aligned rectangles, this means that for each labeling of the selected points, there must be a rectangle that realizes exactly that labeling.

choose another rectanglechoose another rectangleall 0a rectangle excludes everypointmixed labelsa rectangle includesexactly the positive pointsall 1a rectangle includes everypoint
How can the same four points receive different labeling patterns, with a different rectangle selected for each pattern?

The diagram shows representative stages rather than an exhaustive list. The requirement is stronger than moving between these examples: every possible labeling of the selected points must have its own suitable rectangle.

How Rectangles Assign Labels

An axis-aligned rectangle has its sides aligned with the coordinate directions. Its left, right, top, and bottom boundaries determine the rectangular region. A point receives label 1 when it is included by the chosen rectangle and label 0 when it is outside. To realize a target labeling, the rectangle must include exactly the points marked 1 and exclude every point marked 0.

containsexcludesaxis-alignedrectangleleft, right, top, andbottom boundariespositive pointslabel 1negative pointslabel 0
Which points are included by an axis-aligned rectangle, and how does membership correspond to the requested binary labels?

When checking a proposed rectangle, inspect both sides of the labeling requirement: verify that every positive point is inside and every negative point is outside. Including the positive points alone is not enough.

Why Four Points Can Be Shattered

The lower-bound argument starts by exhibiting an appropriate set of four points. For this set, every possible binary assignment can be realized by selecting a suitable axis-aligned rectangle. The assignments include the case in which all four points receive label 1, the case in which all four receive label 0, and every mixed assignment between those extremes.

assign labelsassign labelsassign labelsrealized byrealized byrealized byfour-point setan appropriate arrangementall 0exclude all foursuitable rectangleone choice for eachlabelingmixed labelsinclude exactly thepositive pointsall 1include all four
For each labeling of the four selected points, can an axis-aligned rectangle include exactly the points labeled 1?

Verifying the lower bound

What must be shown to prove that the VC-dimension is at least 4?

Choose four points: Use an appropriate four-point set for which the rectangle class has the required flexibility.

Consider every labeling: Check the all-0 assignment, the all-1 assignment, and every mixed assignment of binary labels.

Select a rectangle: For each labeling, choose an axis-aligned rectangle that includes exactly the points labeled 1.

Because every labeling of this four-point set can be realized, the VC-dimension is at least 4.

Why Five Points Must Fail

The upper-bound argument works for any set of five points. Identify a leftmost point, a rightmost point, a lowest point, and a highest point. Label these four extreme points 1 and label the remaining point 0. An axis-aligned rectangle that contains all four extreme points cannot exclude the remaining point. Therefore, this requested labeling cannot be realized.

must containmust containmust containmust containcannot excludeleftmost pointlabel 1axis-alignedrectanglecontains all four extremepointsremaining pointalso includedrightmost pointlabel 1lowest pointlabel 1highest pointlabel 1remaining pointlabel 0
How do the extreme points force the remaining point inside any axis-aligned rectangle that contains all four positives?

Testing a five-point labeling

Can an axis-aligned rectangle label the four extreme points 1 and the remaining point 0?

Find the extremes: From the five-point set, identify the leftmost, rightmost, lowest, and highest points.

Assign the requested labels: Give label 1 to those four extreme points and label 0 to the remaining point.

Apply the rectangle constraint: Any axis-aligned rectangle containing all four extreme points also contains the remaining point, so it cannot produce the requested labels.

At least one labeling fails for every five-point set, so no five-point set is shattered.

From Bounds to VC-Dimension

at least 4not 5 or largerfour pointscan be shatteredVC-dimension 4exact valuefive pointscannot be shattered
How do the four-point construction and five-point obstruction establish the exact VC-dimension?

The four-point construction establishes a lower bound: the VC-dimension is at least 4. The five-point obstruction establishes an upper bound: no set of five points can be shattered, so the VC-dimension cannot be 5 or larger. Since these bounds meet, the VC-dimension of axis-aligned rectangles is exactly 4.

QuestionFour pointsFive points
Can the set be shattered?Yes, for an appropriate setNo, for every set
Proof roleLower boundUpper bound
ConsequenceVC-dimension is at least 4VC-dimension is less than 5

Common Reasoning Errors

  • Showing only one labeling can be realized.

    Shattering requires every possible labeling of the point set, not merely one successful labeling.

    Fix: Check the all-0, all-1, and every mixed assignment.

  • Using one successful four-point arrangement as evidence that every five-point set works.

    The five-point proof must work for any five-point set and identifies a labeling that each such set fails.

    Fix: Find the leftmost, rightmost, lowest, and highest points, then label those four positive and the remaining point negative.

  • Stopping after proving that four points can be shattered.

    The construction proves only that the VC-dimension is at least 4.

    Fix: Also prove the upper bound by showing that no five-point set can be shattered.

  • Counting hypotheses instead of testing labeling flexibility.

    The decisive issue is how the class labels finite point sets.

    Fix: Analyze which labelings can be realized on a selected collection of points.

Check Your Understanding

MEDIUM

Explain in your own words why the four-point argument gives a lower bound while the five-point argument gives an upper bound. In your explanation, state what must be true for a point set to be shattered.

Hints
  • Start with the meaning of every possible labeling.
  • Ask what one successful four-point construction proves.
  • For five points, identify the four extreme points and the remaining point.

What do you think happens?

Suppose an appropriate four-point set can realize every labeling, but every five-point set has one labeling that fails. What is the VC-dimension?

  • 3
  • 4
  • 5
  • The number of rectangles
Reveal answer

Answer: 4

The four-point construction proves the value is at least 4, and the five-point obstruction proves it cannot reach 5.

Key Takeaways

  1. Shattering means realizing every possible binary labeling of one point set.
  2. An axis-aligned rectangle labels included points 1 and excluded points 0.
  3. An appropriate set of four points can be shattered, including all-0, all-1, and mixed labelings.
  4. For any five points, labeling the leftmost, rightmost, lowest, and highest points 1 and the remaining point 0 cannot be realized.
  5. The VC-dimension of axis-aligned rectangles is exactly 4.

Key Takeaways

  • Shattering is an all-labelings requirement, not a one-labeling test.
  • Four points can be shattered by axis-aligned rectangles for an appropriate point arrangement.
  • Every five-point set has a labeling that no axis-aligned rectangle can realize.
  • The lower and upper bounds meet at 4, so the VC-dimension is exactly 4.