<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>XGBoost |</title><link>https://chaeniverse.github.io/tags/xgboost/</link><atom:link href="https://chaeniverse.github.io/tags/xgboost/index.xml" rel="self" type="application/rss+xml"/><description>XGBoost</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Sat, 21 Sep 2024 00:00:00 +0000</lastBuildDate><image><url>https://chaeniverse.github.io/media/icon_hu_da05098ef60dc2e7.png</url><title>XGBoost</title><link>https://chaeniverse.github.io/tags/xgboost/</link></image><item><title>XGBoost</title><link>https://chaeniverse.github.io/blog/xgboost/</link><pubDate>Sat, 21 Sep 2024 00:00:00 +0000</pubDate><guid>https://chaeniverse.github.io/blog/xgboost/</guid><description>&lt;h2 id="발전-흐름"&gt;발전 흐름&lt;/h2&gt;
&lt;p&gt;단일 decision tree → bagging / Random Forest → Gradient Boosting → &lt;strong&gt;XGBoost&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;XGBoost는 gradient boosting machine의 &lt;strong&gt;성능, 확장성, 속도&lt;/strong&gt; 를 최적화한 구현. 핵심은 &lt;strong&gt;정확한 계산 대신 빠른 근사 해&lt;/strong&gt;를 도입했다는 점.&lt;/p&gt;
&lt;h2 id="split-finding-algorithm"&gt;Split Finding Algorithm&lt;/h2&gt;
&lt;p&gt;Decision tree가 분기점을 찾을 때 가장 큰 비용은 &amp;ldquo;어느 변수의 어느 값에서 split할지&amp;rdquo; 결정하는 것.&lt;/p&gt;
&lt;h3 id="exact-greedy"&gt;Exact Greedy&lt;/h3&gt;
&lt;p&gt;모든 가능한 split 후보를 다 시험. 정렬을 포함해 $O(n \log n)$ 의 복잡도. 데이터가 크면 매우 느리다.&lt;/p&gt;
&lt;h3 id="approximation-방식"&gt;Approximation 방식&lt;/h3&gt;
&lt;p&gt;XGBoost는 변수 값들을 &lt;strong&gt;percentile 기반 bucket&lt;/strong&gt; 으로 나눈 뒤, 각 bucket 안에서만 후보 split을 탐색한다. 예시에서 39개 후보를 30개로 줄이면서 동시에 &lt;strong&gt;bucket 단위로 멀티스레드 병렬화&lt;/strong&gt; 가능.&lt;/p&gt;
&lt;p&gt;두 가지 변종:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Global variant&lt;/strong&gt; — tree depth 전반에 걸쳐 동일한 bucket 구조를 유지&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local variant&lt;/strong&gt; — 노드마다 일정한 bucket 개수를 유지 (depth가 깊어질수록 더 세밀)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;성능 비교: 근사 알고리즘은 exact 방식과 &lt;strong&gt;거의 동등한 정확도&lt;/strong&gt;를 훨씬 짧은 계산 시간으로 달성.&lt;/p&gt;
&lt;h2 id="sparsity-aware-split-finding"&gt;Sparsity-Aware Split Finding&lt;/h2&gt;
&lt;p&gt;결측값 처리에 특화. 학습 시 결측값을 split의 &lt;strong&gt;왼쪽 / 오른쪽으로 보내는 두 옵션을 모두 시험&lt;/strong&gt;해보고, split 성능이 더 좋은 방향을 그 노드의 default direction으로 학습한다.&lt;/p&gt;
&lt;p&gt;→ 결측 패턴이 있는 데이터에서 별도의 imputation 없이도 우수한 성능.&lt;/p&gt;
&lt;h2 id="system-design"&gt;System Design&lt;/h2&gt;
&lt;p&gt;데이터를 &lt;strong&gt;column-wise&lt;/strong&gt; 포맷으로 저장하고 사전에 정렬해 둔다. tree 학습 중 같은 정렬을 반복할 필요 없음 → 메모리 오버헤드 감소, 속도 향상.&lt;/p&gt;
&lt;p&gt;또한 cache-aware access, out-of-core computation, sparse-aware computation 등 시스템 레벨 최적화가 결합되어, 대규모 데이터에서도 실용적인 학습 시간을 보장한다.&lt;/p&gt;
&lt;hr&gt;
&lt;blockquote class="border-l-4 border-neutral-300 dark:border-neutral-600 pl-4 italic text-neutral-600 dark:text-neutral-400 my-6"&gt;
&lt;p&gt;원문:
&lt;/p&gt;
&lt;/blockquote&gt;</description></item></channel></rss>