SlideShare a Scribd company logo
What is XGBoost?
최진
choijin9561@gmail.com
Kaggle & XGBoost
2016년에 작성된 논문 <XGBoost: A
Scalable Tree Boosting System>
2015년 29개의 kaggle winner
solution 중 17개가 XGBoost 사용함
Evolution of XGBoost
출처: https://towardsdatascience.com/understanding-adaboost-2f94f22d5bfe
Gradient Boosting(AdaBoost)의 기본 개념은,
여러 개의 weak classifier들을 결합하여 단일 strong classifier을 만드는 것
 하지만 느린 속도와 overfitting 문제가 발생함
What is XGBoost?
XGBoost는 ‘Gradient Boosting algorithm’의 주요 라이브러리 중 하나
Gradient Boosting의 느린 속도와 overfitting 문제 해결
XGBoost의 특징
• GBM보다는 빠른 속도
• CART(Classification And Regression Tree)를 기반으로 한다.
(즉, 분류화 회귀 둘 다 가능하다)
• 병렬 처리(Parallelization)를 사용하기 때문에 학습과 분류가 빠르다.
• 유연성이 좋다. 다양한 custom 최적화 옵션을 제공한다.
• 욕심쟁이 알고리즘 (Greedy-algorithm)을 사용하여 자동 가지치기가 가능하
다. (overfitting을 줄여줌)
Basic Concept of XGBoost
기존 의사결정나무(Decision Tree)의 주요 원리
여러 기준에 따라 단일 분류를 제대로 하였는지 확인
XGBoost의 기본 원리
tree 1, 2와 같이 단일이 아닌 다중 의사결정나무 이용하여 점수 계산
y(score) = a*tree1(x) + b*tree2(x) + error (단, a,b는 트리의 비중 / a>0, b>0)
Ex) 하얀색 앞치마를 한 여성 = -1 + 0.9 = -0.1로 구분이 모호함
이러한 경우에는 a,b값을 통해 트리 비중 나누기 b>a이면 tree2에 비중을 두고 계산
Math Formula of XGBoost
기본 Gradient Boosting의 방법대로, round가 지날수록(t) 모델의 에러를 줄여감
XGBoost에서는 위 목적함수(Obj)의 오메가를 이용하여 트리의 비중을 조절한다.
오메가는 리프 개수 (gamma) + 리프 스코어 (L2 norm of leaf weight)로 구성됨
이를 통해, 오메가는 모델(f_t)의 복잡도를 결정함을 알 수 있음
XGBoost Python Code
https://www.kaggle.com/jinameliachoi/xgboost
자료 출처
• XGBoost: A Scalable Tree Boosting System (Tianqi Chen & Carlos Guestrin /
University of Washington)
(http://dmlc.cs.washington.edu/data/pdf/XGBoostArxiv.pdf)
• XGBoost eXtreme Gradient Boosting github
(https://github.com/dmlc/xgboost)
• Understanding Gradient Boosting Machines
(https://towardsdatascience.com/understanding-gradient-boosting-machines-
9be756fe76ab)
• What is XGBOOST?
(https://www.kaggle.com/getting-started/145362)
• XGBoost 사용하기
(https://brunch.co.kr/@snobberys/137)

More Related Content

What's hot

データサイエンティスト協会 木曜勉強会 #09 『意志の力が拓くシステム~最適化の適用事例から見たデータ活用システムの現在と未来~』
データサイエンティスト協会 木曜勉強会 #09 『意志の力が拓くシステム~最適化の適用事例から見たデータ活用システムの現在と未来~』データサイエンティスト協会 木曜勉強会 #09 『意志の力が拓くシステム~最適化の適用事例から見たデータ活用システムの現在と未来~』
データサイエンティスト協会 木曜勉強会 #09 『意志の力が拓くシステム~最適化の適用事例から見たデータ活用システムの現在と未来~』
The Japan DataScientist Society
 
Random Forest Intro [랜덤포레스트 설명]
Random Forest Intro [랜덤포레스트 설명]Random Forest Intro [랜덤포레스트 설명]
Random Forest Intro [랜덤포레스트 설명]
Hyunwoo Kim
 
오픈소스를 사용하고, 준비하는 개발자를 위한 가이드
오픈소스를 사용하고, 준비하는 개발자를 위한 가이드오픈소스를 사용하고, 준비하는 개발자를 위한 가이드
오픈소스를 사용하고, 준비하는 개발자를 위한 가이드
if kakao
 
XGBoost & LightGBM
XGBoost & LightGBMXGBoost & LightGBM
XGBoost & LightGBM
Gabriel Cypriano Saca
 
Learning to summarize from human feedback
Learning to summarize from human feedbackLearning to summarize from human feedback
Learning to summarize from human feedback
harmonylab
 
(Handson ml)ch.7-ensemble learning and random forest
(Handson ml)ch.7-ensemble learning and random forest(Handson ml)ch.7-ensemble learning and random forest
(Handson ml)ch.7-ensemble learning and random forest
Haesun Park
 
幾何と機械学習: A Short Intro
幾何と機械学習: A Short Intro幾何と機械学習: A Short Intro
幾何と機械学習: A Short Intro
Ichigaku Takigawa
 
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
NAVER Engineering
 
Google AlphaGo, 어떻게 동작할까요?
Google AlphaGo, 어떻게 동작할까요?Google AlphaGo, 어떻게 동작할까요?
Google AlphaGo, 어떻게 동작할까요?
Lee Ji Eun
 
Xgboost: A Scalable Tree Boosting System - Explained
Xgboost: A Scalable Tree Boosting System - ExplainedXgboost: A Scalable Tree Boosting System - Explained
Xgboost: A Scalable Tree Boosting System - Explained
Simon Lia-Jonassen
 
[DL輪読会]"CyCADA: Cycle-Consistent Adversarial Domain Adaptation"&"Learning Se...
 [DL輪読会]"CyCADA: Cycle-Consistent Adversarial Domain Adaptation"&"Learning Se... [DL輪読会]"CyCADA: Cycle-Consistent Adversarial Domain Adaptation"&"Learning Se...
[DL輪読会]"CyCADA: Cycle-Consistent Adversarial Domain Adaptation"&"Learning Se...
Deep Learning JP
 
LightGBM: a highly efficient gradient boosting decision tree
LightGBM: a highly efficient gradient boosting decision treeLightGBM: a highly efficient gradient boosting decision tree
LightGBM: a highly efficient gradient boosting decision tree
Yusuke Kaneko
 
全体セミナー20170629
全体セミナー20170629全体セミナー20170629
全体セミナー20170629
Jiro Nishitoba
 
디지털 트랜스포메이션의 이해와 도입 사례 - Understanding of digital transformation and examples...
디지털 트랜스포메이션의 이해와 도입 사례 - Understanding of digital transformation and examples...디지털 트랜스포메이션의 이해와 도입 사례 - Understanding of digital transformation and examples...
디지털 트랜스포메이션의 이해와 도입 사례 - Understanding of digital transformation and examples...
Hakyong Kim
 
State of JTS 2018
State of JTS 2018State of JTS 2018
State of JTS 2018
Jody Garnett
 
상상을 현실로 만드는, 이미지 생성 모델을 위한 엔지니어링
상상을 현실로 만드는, 이미지 생성 모델을 위한 엔지니어링상상을 현실로 만드는, 이미지 생성 모델을 위한 엔지니어링
상상을 현실로 만드는, 이미지 생성 모델을 위한 엔지니어링
Taehoon Kim
 
第6回WBAシンポジウム:脳参照アーキテクチャ 駆動開発からの AGI構築ロードマップ
第6回WBAシンポジウム:脳参照アーキテクチャ 駆動開発からの AGI構築ロードマップ第6回WBAシンポジウム:脳参照アーキテクチャ 駆動開発からの AGI構築ロードマップ
第6回WBAシンポジウム:脳参照アーキテクチャ 駆動開発からの AGI構築ロードマップ
The Whole Brain Architecture Initiative
 
Semi-supervised Learning
Semi-supervised LearningSemi-supervised Learning
Semi-supervised Learning
butest
 
Introduction to XGBoost
Introduction to XGBoostIntroduction to XGBoost
Introduction to XGBoost
Joonyoung Yi
 
Fast Unbalanced Optimal Transport on a Tree
Fast Unbalanced Optimal Transport on a TreeFast Unbalanced Optimal Transport on a Tree
Fast Unbalanced Optimal Transport on a Tree
joisino
 

What's hot (20)

データサイエンティスト協会 木曜勉強会 #09 『意志の力が拓くシステム~最適化の適用事例から見たデータ活用システムの現在と未来~』
データサイエンティスト協会 木曜勉強会 #09 『意志の力が拓くシステム~最適化の適用事例から見たデータ活用システムの現在と未来~』データサイエンティスト協会 木曜勉強会 #09 『意志の力が拓くシステム~最適化の適用事例から見たデータ活用システムの現在と未来~』
データサイエンティスト協会 木曜勉強会 #09 『意志の力が拓くシステム~最適化の適用事例から見たデータ活用システムの現在と未来~』
 
Random Forest Intro [랜덤포레스트 설명]
Random Forest Intro [랜덤포레스트 설명]Random Forest Intro [랜덤포레스트 설명]
Random Forest Intro [랜덤포레스트 설명]
 
오픈소스를 사용하고, 준비하는 개발자를 위한 가이드
오픈소스를 사용하고, 준비하는 개발자를 위한 가이드오픈소스를 사용하고, 준비하는 개발자를 위한 가이드
오픈소스를 사용하고, 준비하는 개발자를 위한 가이드
 
XGBoost & LightGBM
XGBoost & LightGBMXGBoost & LightGBM
XGBoost & LightGBM
 
Learning to summarize from human feedback
Learning to summarize from human feedbackLearning to summarize from human feedback
Learning to summarize from human feedback
 
(Handson ml)ch.7-ensemble learning and random forest
(Handson ml)ch.7-ensemble learning and random forest(Handson ml)ch.7-ensemble learning and random forest
(Handson ml)ch.7-ensemble learning and random forest
 
幾何と機械学習: A Short Intro
幾何と機械学習: A Short Intro幾何と機械学習: A Short Intro
幾何と機械学習: A Short Intro
 
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
 
Google AlphaGo, 어떻게 동작할까요?
Google AlphaGo, 어떻게 동작할까요?Google AlphaGo, 어떻게 동작할까요?
Google AlphaGo, 어떻게 동작할까요?
 
Xgboost: A Scalable Tree Boosting System - Explained
Xgboost: A Scalable Tree Boosting System - ExplainedXgboost: A Scalable Tree Boosting System - Explained
Xgboost: A Scalable Tree Boosting System - Explained
 
[DL輪読会]"CyCADA: Cycle-Consistent Adversarial Domain Adaptation"&"Learning Se...
 [DL輪読会]"CyCADA: Cycle-Consistent Adversarial Domain Adaptation"&"Learning Se... [DL輪読会]"CyCADA: Cycle-Consistent Adversarial Domain Adaptation"&"Learning Se...
[DL輪読会]"CyCADA: Cycle-Consistent Adversarial Domain Adaptation"&"Learning Se...
 
LightGBM: a highly efficient gradient boosting decision tree
LightGBM: a highly efficient gradient boosting decision treeLightGBM: a highly efficient gradient boosting decision tree
LightGBM: a highly efficient gradient boosting decision tree
 
全体セミナー20170629
全体セミナー20170629全体セミナー20170629
全体セミナー20170629
 
디지털 트랜스포메이션의 이해와 도입 사례 - Understanding of digital transformation and examples...
디지털 트랜스포메이션의 이해와 도입 사례 - Understanding of digital transformation and examples...디지털 트랜스포메이션의 이해와 도입 사례 - Understanding of digital transformation and examples...
디지털 트랜스포메이션의 이해와 도입 사례 - Understanding of digital transformation and examples...
 
State of JTS 2018
State of JTS 2018State of JTS 2018
State of JTS 2018
 
상상을 현실로 만드는, 이미지 생성 모델을 위한 엔지니어링
상상을 현실로 만드는, 이미지 생성 모델을 위한 엔지니어링상상을 현실로 만드는, 이미지 생성 모델을 위한 엔지니어링
상상을 현실로 만드는, 이미지 생성 모델을 위한 엔지니어링
 
第6回WBAシンポジウム:脳参照アーキテクチャ 駆動開発からの AGI構築ロードマップ
第6回WBAシンポジウム:脳参照アーキテクチャ 駆動開発からの AGI構築ロードマップ第6回WBAシンポジウム:脳参照アーキテクチャ 駆動開発からの AGI構築ロードマップ
第6回WBAシンポジウム:脳参照アーキテクチャ 駆動開発からの AGI構築ロードマップ
 
Semi-supervised Learning
Semi-supervised LearningSemi-supervised Learning
Semi-supervised Learning
 
Introduction to XGBoost
Introduction to XGBoostIntroduction to XGBoost
Introduction to XGBoost
 
Fast Unbalanced Optimal Transport on a Tree
Fast Unbalanced Optimal Transport on a TreeFast Unbalanced Optimal Transport on a Tree
Fast Unbalanced Optimal Transport on a Tree
 

What is XGBoost?

  • 2. Kaggle & XGBoost 2016년에 작성된 논문 <XGBoost: A Scalable Tree Boosting System> 2015년 29개의 kaggle winner solution 중 17개가 XGBoost 사용함
  • 4. 출처: https://towardsdatascience.com/understanding-adaboost-2f94f22d5bfe Gradient Boosting(AdaBoost)의 기본 개념은, 여러 개의 weak classifier들을 결합하여 단일 strong classifier을 만드는 것  하지만 느린 속도와 overfitting 문제가 발생함
  • 5. What is XGBoost? XGBoost는 ‘Gradient Boosting algorithm’의 주요 라이브러리 중 하나 Gradient Boosting의 느린 속도와 overfitting 문제 해결 XGBoost의 특징 • GBM보다는 빠른 속도 • CART(Classification And Regression Tree)를 기반으로 한다. (즉, 분류화 회귀 둘 다 가능하다) • 병렬 처리(Parallelization)를 사용하기 때문에 학습과 분류가 빠르다. • 유연성이 좋다. 다양한 custom 최적화 옵션을 제공한다. • 욕심쟁이 알고리즘 (Greedy-algorithm)을 사용하여 자동 가지치기가 가능하 다. (overfitting을 줄여줌)
  • 6. Basic Concept of XGBoost 기존 의사결정나무(Decision Tree)의 주요 원리 여러 기준에 따라 단일 분류를 제대로 하였는지 확인
  • 7. XGBoost의 기본 원리 tree 1, 2와 같이 단일이 아닌 다중 의사결정나무 이용하여 점수 계산 y(score) = a*tree1(x) + b*tree2(x) + error (단, a,b는 트리의 비중 / a>0, b>0) Ex) 하얀색 앞치마를 한 여성 = -1 + 0.9 = -0.1로 구분이 모호함 이러한 경우에는 a,b값을 통해 트리 비중 나누기 b>a이면 tree2에 비중을 두고 계산
  • 8. Math Formula of XGBoost 기본 Gradient Boosting의 방법대로, round가 지날수록(t) 모델의 에러를 줄여감 XGBoost에서는 위 목적함수(Obj)의 오메가를 이용하여 트리의 비중을 조절한다. 오메가는 리프 개수 (gamma) + 리프 스코어 (L2 norm of leaf weight)로 구성됨 이를 통해, 오메가는 모델(f_t)의 복잡도를 결정함을 알 수 있음
  • 10. 자료 출처 • XGBoost: A Scalable Tree Boosting System (Tianqi Chen & Carlos Guestrin / University of Washington) (http://dmlc.cs.washington.edu/data/pdf/XGBoostArxiv.pdf) • XGBoost eXtreme Gradient Boosting github (https://github.com/dmlc/xgboost) • Understanding Gradient Boosting Machines (https://towardsdatascience.com/understanding-gradient-boosting-machines- 9be756fe76ab) • What is XGBOOST? (https://www.kaggle.com/getting-started/145362) • XGBoost 사용하기 (https://brunch.co.kr/@snobberys/137)