initial commit FESurrogateModelTutorial
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
# Gradient Boosting Surrogate
|
||||
|
||||
## 핵심 아이디어
|
||||
Gradient Boosting은 약한 예측기, 보통 shallow decision tree를 순차적으로 더해 손실함수를 줄이는 additive model이다. 각 단계의 tree는 이전 모델의 오차를 보정하는 방향으로 학습된다.
|
||||
|
||||
```text
|
||||
F_M(x) = F_0(x) + sum_{m=1}^{M} nu h_m(x)
|
||||
```
|
||||
|
||||
- `F_M`: 최종 모델.
|
||||
- `h_m`: m번째 weak learner.
|
||||
- `nu`: learning rate.
|
||||
|
||||
Friedman의 2001년 논문은 gradient boosting machine을 함수공간에서의 greedy approximation으로 설명한다.
|
||||
|
||||
## FEM surrogate에서의 의미
|
||||
Gradient Boosting은 Random Forest보다 bias를 더 적극적으로 줄이는 경우가 많다. Beam surrogate에서 낮은 차수 RSM이 놓치는 비선형성을 tree ensemble이 순차적으로 보정할 수 있다.
|
||||
|
||||
## 구현 선택
|
||||
이 튜토리얼에서는 scikit-learn의 `GradientBoostingRegressor`를 사용한다.
|
||||
|
||||
기본 설정 예:
|
||||
|
||||
```text
|
||||
GradientBoostingRegressor(
|
||||
loss="squared_error",
|
||||
learning_rate=0.05,
|
||||
n_estimators=300,
|
||||
max_depth=3,
|
||||
subsample=0.9,
|
||||
random_state=20260521
|
||||
)
|
||||
```
|
||||
|
||||
`learning_rate`와 `n_estimators`는 함께 조정해야 한다. 작은 learning rate는 더 많은 tree를 요구하지만 과적합을 완화할 수 있다.
|
||||
|
||||
## Notebook 실습 포인트
|
||||
`notebooks/04_gradient_boosting_surrogate.ipynb`는 다음을 보여준다.
|
||||
|
||||
1. 동일 dataset과 split 로드.
|
||||
2. `learning_rate`와 `n_estimators` tradeoff.
|
||||
3. staged prediction으로 train/test error curve 확인.
|
||||
4. parity plot과 residual plot.
|
||||
5. permutation importance 또는 built-in feature importance 비교.
|
||||
6. Random Forest와 오차 패턴 비교.
|
||||
|
||||
## 장점
|
||||
- tabular regression에서 높은 성능을 내기 쉽다.
|
||||
- 비선형성과 interaction을 잘 포착한다.
|
||||
- model size와 성능의 tradeoff를 조절하기 쉽다.
|
||||
- staged prediction으로 과적합 진행을 관찰할 수 있다.
|
||||
|
||||
## 한계와 실패 모드
|
||||
- hyperparameter에 Random Forest보다 민감하다.
|
||||
- noise가 큰 데이터에서는 오차를 과도하게 따라갈 수 있다.
|
||||
- tree 기반 모델이므로 외삽은 약하다.
|
||||
- 학습 순서가 sequential하므로 Random Forest보다 병렬화 이점이 작다.
|
||||
- 너무 복잡한 설정은 교육용 notebook을 흐리게 만들 수 있다.
|
||||
|
||||
## 구조해석 해석 기준
|
||||
Gradient Boosting이 좋은 선택인 경우:
|
||||
|
||||
- 정확도가 중요한 tabular surrogate가 필요하다.
|
||||
- 입력 변수 수가 적거나 중간 규모다.
|
||||
- 해석 응답이 비선형이지만 불연속은 아니다.
|
||||
- 최종 비교에서 강한 classical ML baseline이 필요하다.
|
||||
|
||||
주의할 경우:
|
||||
|
||||
- uncertainty가 핵심 요구사항이다.
|
||||
- 모델 해석성이 RSM 수준으로 필요하다.
|
||||
- 데이터 수가 매우 적다.
|
||||
|
||||
## References
|
||||
- Friedman, J. H. (2001), "Greedy Function Approximation: A Gradient Boosting Machine", The Annals of Statistics. https://doi.org/10.1214/aos/1013203451
|
||||
- CiNii bibliographic record for Friedman (2001). https://cir.nii.ac.jp/crid/1360292617909870720
|
||||
- scikit-learn `GradientBoostingRegressor` documentation. https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingRegressor.html
|
||||
Reference in New Issue
Block a user