728x90 반응형 Random Forests3 Double Descent: new approach of bias-variance trade-off Double Descent: Modern approach of bias-variance trade-offclassic ML의 관점에서, bias-variance trade-off는 model complexity와 관련있다.이전 포스트를 참고해도 좋다.https://trivia-starage.tistory.com/238 Overfitting을 막는 방법들 (regularization, cross-validation, early stopping)Overfitting and Regularization ※ The blog post is based on lecture materials from Xavier Bresson, a professor at the National University of Singapore.. 2024. 3. 3. [Ensemble] Random Forests in Python (scikit-learn) Setupbagging과 random forest를 실습하기 위해 필요한 라이브러리를 import하자.# To support both python 2 and python 3from __future__ import division, print_function, unicode_literals# Common importsimport numpy as npimport os# to make this notebook's output stable across runsnp.random.seed(42)# To plot pretty figures%matplotlib inlineimport matplotlib as mplimport matplotlib.pyplot as pltfrom matplotlib.colors impor.. 2023. 5. 13. [Ensemble] Random Forests Random ForestsRandom Forests는 Bagging algorithm의 대표적인 방법이다.전체 데이터가 $N \times M$ 행렬이라 하자. ($N$은 instance 개수, $M$은 feature 개수)그리고 복원추출(random sampleing with replacement)을 이용하여 $N$개의 sample을 추출하여 학습데이터셋을 만든다.각 복원추출된 데이터 $D_i$마다 decision tree $C_i$를 학습한다. (각 모델이 사용하는 feature 수는 아래 Training을 참고)Note: Regression에서는 averaging, Classification에서는 max-voting을 이용한다.Bootstrap Sample$\mathcal{D} = \{ X_1, \d.. 2023. 5. 12. 이전 1 다음 728x90 반응형