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(A1Ak)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 ˆϕ=1mmi=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 y0,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)=1mmi=11{h(x)(i)y(i)}

Generalization error

ϵ(h)=P(x,y)D(h(x)y)

Hypothesis class H
  • H={hθ:hθ(x)=1{θTx0},θRn+1}
  • Decision boundary is linear
Empirical risk minimization

ˆh=argminhHˆϵ(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를 구해보자.
  • hiH 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)=1mmj=1Zj

  • ˆϵ(hi)는 m개의 random variables Zj에 대한 평균값이고, 각각의 Zj는 평균이 ϵ(hi)인 Bernoulli distribution에서 sampling되었음.

Apply Hoeffding inequality

P(|ϵ(hi)ˆϵ(hi)|>γ)2exp(2γ2m)

  • hi 하나에 대해서만 정의하지 않고, 모든 hH에 대해 정의해보자.

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에 대해서 풀자.
    • m12γ2log2kδ

3. Generalization bound

  • δ=2kexp(2γ2m) => γ에 대해서 풀자.
  • 12mlog2kδ=γ
  • |ˆϵ(h)ϵ(h)|γ(1)
  • |ˆϵ(h)ϵ(h)|12mlog2kδ
  • ˆh=argminhHˆϵ(h) ; training error를 가장 작게 해주는 hypothesis function
  • h=argminhHϵ(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