Skip to main content
Interactive 3D/VC Dimension
Points n
n = 3VCdim=3
26
Halfplane
Angle 45°
Bias -0.10
Dichotomies
Found:8 / 8
Shattered:Yes
VC dim = 3 for halfplanes in 2D. Any 3 non-collinear points can be shattered. 4+ points: there always exists a labeling no halfplane can achieve.
Click a point to drag it. Use "Browse Labels" to cycle through all achievable dichotomies and spot which is missing.

VC Dimension - Interactive Visualization

The VC dimension measures the expressive capacity of a hypothesis class. It is the largest set of points the class can shatter - classify in all possible ways. Linear classifiers in 2D have VC dimension 3 (can shatter any 3 points in general position) but not 4. Larger VC dimension means more complex hypotheses but also requires more training data to generalize.

  • Place points on a 2D plane and see which labelings halfplanes can realize
  • Try 3 points: all 2³=8 labelings are achievable with halfplanes
  • Try 4 points: not all 2⁴=16 labelings are achievable - VC dimension is exactly 3
  • Understand how VC dimension bounds generalization error
  • Foundation for SVM theory, learning complexity, and model selection

Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.