VC-Dimension和Rademacher complexity是机器学习中常提到的度量复杂的的概念,一直远观而没有亵玩,今天对这个概念进行学习记录。
VC-Dimension
全称为Vapnik-Chervonenkis dimension,从wiki上搞来一段定义
In Vapnik–Chervonenkis theory, the Vapnik–Chervonenkis (VC) dimension is a measure of the capacity (complexity, expressive power, richness, or flexibility) of a space of functions that can be learned by a statistical classification algorithm. It is defined as the cardinality of the largest set of points that the algorithm can shatter. It was originally defined by Vladimir Vapnik and Alexey Chervonenkis.[1]
即:在VC 理论中,VC维度是一种度量由统计分类算法得到的函数空间的容量(复杂度,表达能力,丰富性或灵活性)的方法。它被定义为算法可以破坏的最大点集的基数。
集合族的VC维
令为集合族,
是一个集合。它们的交被定义为
我们说集合被
shatter,如果
包含
的所有子集,即:
的VC维
是被破坏的最大基数,如果任意大的子集能被破坏,那么VC维是
。
分类模型的VC维
一个分类模型有着参数向量
被称为shatter一个集合的数据点
如果对这些数据点所有赋予的标签,都存在
使得
在评估这个集合的数据点的时候无错误。
模型的VC维是能被
shatter的最大点数。
例子
例如一条直线在平面分类,那么最多二分类的点数为3,所以VC维为3.
Rademacher complexity
In computational learning theory (machine learning and theory of computation), Rademacher complexity, named after Hans Rademacher, measures richness of a class of real-valued functions with respect to a probability distribution.
在计算学习理论中(机器学习和计算理论),Rademacher comlexity由Hans Rademacher命名,度量一类基于概率分布实值函数的丰富性。
集合的Rademacher comlexity
给定集合,
的Rademacher complexity定义如下:
其中是Rademacher分布得到的独立随机变量。
for
and
。
许多作者在取上界前取了和的绝对值,但是如果是对称的,那么这就没区别。
函数类的Rademacher comlexity
给定样本,类别
定义在空间
,
的实验Rademacher
complexity对给定的定义为:
这也可以使用之前的定义来写:
其中表示函数复合,即:
令是
的概率分布。函数类
的Rademacher complexity基于
且样本大小为
为:
其中上述期望都是从中采样独立同分布的样本。