[Classification Problem] Ensemble 종류 (Bagging, Boosting, Stacking)

jayce·2024년 6월 29일
post-thumbnail

Ensemble 종류


  • Bagging : Reduce the Variance
    • Stacking : Use another prediction model
  • Boosting : Reduce the Bias

Bagging


  • Reduce the Variance
  • Bagging : Bootstrap Aggregating
    • Bootstrap : 표본에서 추가적으로 표본을 복원 추출하고 각 표본에 대한 통계량을 다시 계산하는 것
    • N개의 Data가 있으면 N개를 Randomly하게 뽑아내서 새로운 Data Set을 구성함
  • Bootstrap을 진행하면 확률 상 뽑히지 못한 데이터는 36.8%가 됨
    p=(11N)NlimN(11N)N=e1=0.368p = \left(1 - \frac{1}{N}\right)^N \rightarrow \lim_{N \to \infty} \left(1 - \frac{1}{N}\right)^N = e^{-1} = 0.368

Model Result Aggregating Method

Majority voting

y^Ensemble=argmaxi(j=1nδ(y^j=i)),i{0,1}\hat{y}_{Ensemble} = \arg\max_{i} \left( \sum_{j=1}^{n} \delta(\hat{y}_j = i) \right), \quad i \in \{0, 1\}

Weighted voting 1

y^Ensemble=argmaxi(j=1n(TrnAccj)δ(y^j=i)j=1n(TrnAccj)),i{0,1}\hat{y}_{Ensemble} = \arg\max_{i} \left( \frac{\sum_{j=1}^{n} (TrnAcc_j) \cdot \delta(\hat{y}_j = i)}{\sum_{j=1}^{n} (TrnAcc_j)} \right), \quad i \in \{0, 1\}

Weighted voting 2

y^Ensemble=argmaxi(1nj=1nP(y=i)),i{0,1}\hat{y}_{Ensemble} = \arg\max_{i} \left( \frac{1}{n} \sum_{j=1}^{n} P(y = i) \right), \quad i \in \{0, 1\}

Model Result Aggregating Method

Stacking


  • Use another prediction model

Boosting

  • Reduce the Bias
  • 처음에 못 맞춘 데이터에 대해서 우선순위를 부여해 학습확률을 높여서 맞출 때까지 수행

0개의 댓글