2026-08-28·作者 Sijie Wang#idea#math

interval

Interval — VC = 2

Parent: examples Prereq: learning-theory — H, h, shattering.

Class H={ ha,b:a≤b }H = \{\, h_{a,b} : a \le b \,\}, two parameters:

ha,b(x)={+a≤x≤b−otherwiseh_{a,b}(x) = \begin{cases} + & a \le x \le b \\ - & \text{otherwise} \end{cases}

Count it the same way. (Recall ha,b(p)=+h_{a,b}(p) = {+} iff a≤p≤ba \le p \le b.)

Shatter 2 points p₁ < p₂? labeling (h(p₁), h(p₂)); exhibit an [a,b] for each:

labelinga witnessing [a,b]realizable?
(−,−)any [a,b] with b < p₁✓
(+,−)[p₁, p₁] (so p₁ ≤ b < p₂)✓
(−,+)[p₂, p₂] (so p₁ < a ≤ p₂)✓
(+,+)[p₁, p₂]✓

All 4 realizable → shatters 2 → VC ≥ 2. (The (+,−)/(−,+) a threshold couldn't do, the interval now can.)

Shatter 3 points p₁ < p₂ < p₃? the labeling (+,−,+) requires a ≤ p₁ ≤ b and a ≤ p₃ ≤ b; together these give a ≤ p₁ < p₂ < p₃ ≤ b, forcing p₂ ∈ [a,b], i.e. h(p₂) = + — contradiction. So (+,−,+) is unrealizable → no 3 points shatter → VC < 3. So VC = 2.

So the interval's VC 2 came from counting shatterable points (2), not from "it has 2 endpoints" — the endpoint count matched here by luck.

Breaks on + − + (needs two separate bands) → climb to union-of-intervals.

關於這一條

sijie 的一條 wiki 條目。本站的 AI 以同一套語料庫為依據、以 sijie 的口吻作答,並附有指向此類條目的引用——回答會花 sijie 的錢,所以它在存取碼後等待: 輸入存取碼 →

interval — Sijie Wang