2026-08-28·by Sijie Wang#idea#math

linear-separators

平面中的线性分类器 — VC 维 = 3

上级:examples 前置:learning-theory —— Hh、打散(shattering);

假设类 H={hw,b:wR2, bR}H = \{\, h_{w,b} : w \in \mathbb{R}^2,\ b \in \mathbb{R} \,\}(权重向量 w,偏置 b):

hw,b(x)={+wx+b0otherwiseh_{w,b}(x) = \begin{cases} + & w \cdot x + b \ge 0 \\ - & \text{otherwise} \end{cases}

一条直线把平面切成 +/ 两半(一个假设 = 一刀)。它能打散任意 3 个不共线的点——2³ = 8 种标注全部覆盖——但在 XOR 排布上对 4 个点失败:两个 + 角落在一条对角线上,两个 角落在另一条对角线上,而两条对角线在中心相交,所以没有一条直线能把两个 + 分到一侧、两个 分到另一侧。

没错,两条直线确实能把 XOR 切开——但"两条直线"是一个不同的、VC 维更高的类。VC 维数的是你这个类里的一个假设能做到什么;对线性分类器来说,那就是一刀直切。

(一般地,线性分类器——齐次半空间加偏置——在 ℝᵈ 中的 VC 维为 d+1。)

cited by
about this entry

One of sijie's wiki entries. The AI on this site is grounded in the same corpus and answers in sijie's voice, with citations back to entries like this one — answering costs sijie money, so it waits behind a code: enter an access code →