PAC与样本复杂度
這篇文章主要總結 PAC 學習框架以及樣本復雜度相關的東西,大致來說就是:要保證以概率 1?δ1-\delta1?δ 使得 generalized error 小于 ?\epsilon? 需要多大的樣本復雜度,以及時間復雜度才是好的。
問題及約定
符號約定
兩個 error 符號
就是我們常說的 train error 與 true error
接下來是定義我們要研究的問題
簡單的來說就是 依賴于 m,H,?,δm,H,\epsilon,\deltam,H,?,δ 這四個東西,我們找到一個 樣本復雜度以及計算復雜度的界.或者說找到他們的一些關系
定義
consistent hypothesis:
consistent(h,S)∣=h(x)=c(x),?(x,c(x))∈Sconsistent(h,S) |= h(x)=c(x),\forall (x,c(x))\in Sconsistent(h,S)∣=h(x)=c(x),?(x,c(x))∈S
一個 假設稱為是 consistent 的,if and only if, ?(x,c(x))∈S\forall (x,c(x))\in S?(x,c(x))∈S 都有,h(x)=c(x)h(x)=c(x)h(x)=c(x)
Version Space:
VSH,S:{h∈H∣consistent(h,S)}VS_{H,S}:\{h \in H|consistent(h,S)\}VSH,S?:{h∈H∣consistent(h,S)}
??exhausted\epsilon-exhausted??exhausted
VSH,SVS_{H,S}VSH,S? 稱為 ??exhausted\epsilon-exhausted??exhausted,當且僅當,
?h∈H,errorD(h)<?\forall h\in H,error_D(h)<\epsilon?h∈H,errorD?(h)<?
throme
這個定理的證明會在文末給出,接下來的核心就在于理解這個定理
理解
這個定理的前提:
注意這個定理說的是 not,將這個定理翻譯一下就是
Pr?(?h∈H,(errorS(h)=0)&(errorD(h)>?))<∣H∣exp???m\Pr(\exists h \in H,(error_S(h)=0)\And(error_D(h)>\epsilon))<|H|\exp^{-\epsilon m}Pr(?h∈H,(errorS?(h)=0)&(errorD?(h)>?))<∣H∣exp??m
也就是說 如果 errorS(h)=0error_S(h)=0errorS?(h)=0, 那么 errorD(h)<?error_D(h)<\epsilonerrorD?(h)<? 的概率至少是 ∣H∣exp???m|H|\exp^{-\epsilon m}∣H∣exp??m
如果我們想要讓 ∣H∣exp???m<δ|H|\exp^{-\epsilon m} < \delta∣H∣exp??m<δ, 那么我們需要
m>??1(log?(∣H∣)+log?(δ?1))m>\epsilon^{-1}(\log(|H|)+\log(\delta^{-1}))m>??1(log(∣H∣)+log(δ?1)),這么多變量
if errorS(h)=0error_S(h)=0errorS?(h)=0 那么 至少我們有 1?δ1-\delta1?δ 的概率保證
errorD(h)≤m?1(log?(∣H∣)+log?(δ?1))error_D(h)\le m^{-1}(\log(|H|)+\log(\delta^{-1}))errorD?(h)≤m?1(log(∣H∣)+log(δ?1))
PAC learnable
簡單的說,一個算法是 PAC(Probability Approximation Correct) 可學習的,要滿足,時間復雜度和樣本復雜度都是多項式的
agnostic learning
上面都說的是 c∈Hc\in Hc∈H ,那如果, c?Hc\notin Hc∈/?H 呢?
根據 Hoeffding 不等式(see wiki)
fix a hhh,
Pr?(errorD(h)?errorS(h)>?)≤2exp??2m?2\Pr(error_D(h)-error_S(h)>\epsilon)\le 2\exp^{-2m\epsilon^2}Pr(errorD?(h)?errorS?(h)>?)≤2exp?2m?2
修改前面的定理,
Pr?(?h∈H,errorD(h)?errorS(h)>?)<∣H∣2exp??2m?2\Pr(\exists h\in H,error_D(h)-error_S(h)>\epsilon)<|H|2\exp^{-2m\epsilon^2}Pr(?h∈H,errorD?(h)?errorS?(h)>?)<∣H∣2exp?2m?2
因此在概率為 δ\deltaδ 的情況下,需要的樣本 bound
就可以很容易求解了
erm
最后不加證明的給出
即 如果我們知道 errS(h)err_S(h)errS?(h) 那么 errorD(h)error_D(h)errorD?(h) 的bound 在哪里?
所有的證明和材料,都可見reference
reference
版權聲明
本作品為作者原創文章,采用知識共享署名-非商業性使用-相同方式共享 4.0 國際許可協議
作者: taotao
轉載請保留此版權聲明,并注明出處
總結
- 上一篇: 临界区、互斥量、事件、信号量四种方式
- 下一篇: JAVA高级(一)——lambda