Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Roads and Libraries
- 격파르타 후기
- Find the nearest clone
- 피보나치 함수
- Interview Preparation Kit
- candies
- Special String Again
- Max Array Sum
- DFS: Connected Cell in a Grid
- 해커랭크
- 격파르타 합격후기
- 구슬탈출2
- Common Child
- python
- 격파르타 장점
- Reverse Shuffle Merge
- 머신러닝
- 알고리즘
- 매칭점수
- Algorithm
- 야근지수
- 코딩테스트
- programmers
- 백준
- [sqld]자격증합격
- BFS: Shortest Reach in a Graph
- Recursion: Davis' Staircase
- 프로그래머스
- hackerrank
- 파이썬
Archives
- Today
- Total
Archive
[Learning theory] Bias variance trade-off (Hoeffding inequality) 본문
공부/Machine Learning
[Learning theory] Bias variance trade-off (Hoeffding inequality)
mariabeetle 2019. 10. 12. 20:00- 유한 개의 Hypothesis set을 가정하고, training error를 가장 적게 하는 hypothesis에 대해서 generalization error bound를 구함.
- 위에서 구한 generalization error bound를 통해 learning theory 관점에서 bias variance trade-off를 볼 수 있음.
1. Preliminaries
Lemma. (The union bound)
- Let A1,A2,...,Ak be k different events(that may not be independent). Then
P(A1∪⋯∪Ak)≤P(A1)+⋯+P(Ak)
Lemma. (Hoeffding inequality) (Chernoff bound)
- Let Z1,...,Zm be m independent and indentically distributed(iid) random variables drawn from a Bernoulli(ϕ) distribution(I.e. P(Zi=1)=ϕ, and P(Zi=0)=1−ϕ).
- Let ˆϕ=1m∑mi=1Zi be the mean of these random variables, and let any γ>0 be fixed. Then
P(|ϕ−ˆϕ|>γ)≤2exp(−2γ2m)
Assumption
- binary classifiation with the labels are y∈0,1
- Training set S={(x(i),y(i));i=1,...,m} of size m, drawn iid from some probability distribution D.
Training error(empirical risk or empirical error)
ˆϵ(h)=1mm∑i=11{h(x)(i)≠y(i)}
Generalization error
ϵ(h)=P(x,y)∼D(h(x)≠y)
Hypothesis class H
- H={hθ:hθ(x)=1{θTx≥0},θ∈Rn+1}
- Decision boundary is linear
Empirical risk minimization
ˆh=argminh∈Hˆϵ(h)
2. The case of finite H
- H=h1,...,hk
- H is a set of k functions mapping from X to {0, 1}
- ˆh : smallest training error를 보여주는 hypothesis function 안에서의 함수.
- 목표 : ˆh에 대해 generalization error를 구해보자.
- hi∈H hypothesis function hi 고정.
- Z=1{hi(x)≠y}
- Zj=1{hi(x(j)≠y(j))} : j번째 데이터셋에 대한 Zj 값
- Training set이 D에서 샘플링되었기 때문에, Zj들도 같은 distribution을 가지게 됨.
Training error
-
ˆϵ(hi)=1m∑mj=1Zj
-
ˆϵ(hi)는 m개의 random variables Zj에 대한 평균값이고, 각각의 Zj는 평균이 ϵ(hi)인 Bernoulli distribution에서 sampling되었음.
Apply Hoeffding inequality
P(|ϵ(hi)−ˆϵ(hi)|>γ)≤2exp(−2γ2m)
- hi 하나에 대해서만 정의하지 않고, 모든 h∈H에 대해 정의해보자.
Uniform convergence
-
Ai : |ϵ(hi)−^ϵ(hi)|>γ 인 event
-
P(Ai)≤2exp(−2γ2m) => 여기에 uniform bound 적용
-
Three quantities
- m : training data 개수
- γ : 평균과의 차이(거리)
- probability of error : 2kexp(−2γ2m)
-
Sample complexity : training error와 generalization error 차이가 γ보다 작게 하기 위해서 얼마나 많은 training dataset이 필요할까?
- δ≥2kexp(−2γ2m) => m에 대해서 풀자.
- m≥12γ2log2kδ
3. Generalization bound
- δ=2kexp(−2γ2m) => γ에 대해서 풀자.
- √12mlog2kδ=γ
- |ˆϵ(h)−ϵ(h)|≤γ⋯(1)
- |ˆϵ(h)−ϵ(h)|≤√12mlog2kδ
- ˆh=argminh∈Hˆϵ(h) ; training error를 가장 작게 해주는 hypothesis function
- h∗=argminh∈Hϵ(h) : generalization error를 가장 작게 해주는 hypothesis function
- ϵ(ˆh)≤ˆϵ(ˆh)+γ ; 위의 부등식 (1), ˆh의 정의가 ˆϵ(⋅) 함수의 최솟값
- ˆϵ(ˆh)는 ˆϵ(h∗)보다 작거나 같음.
- ˆϵ(h∗)≤ϵ(h∗)+γ ; 부등식 (1), h∗는 ϵ(⋅) 함수의 최솟값.
reference = http://cs229.stanford.edu/
'공부 > Machine Learning' 카테고리의 다른 글
[ML] Convolution 정리 (1) | 2020.09.08 |
---|---|
유전알고리즘 시험 내용 요약 (0) | 2019.12.06 |
Comments