# XGBoost

**XGBoost (Extreme Gradient Boosting)** là thuật toán boosting dựa trên cây quyết định.

Ý tưởng chính:

* Xây dựng nhiều cây nhỏ
* Mỗi cây học từ lỗi của cây trước đó
* Tổng hợp các cây để tạo mô hình mạnh

Dạng tổng quát:

y^=∑k=1Kfk(x)\hat{y} = \sum\_{k=1}^{K} f\_k(x)y^​=k=1∑K​fk​(x)

***

### XGBoost có phải baseline không?

Không.

XGBoost thường được xem là:

* Strong learner
* Advanced model
* State-of-the-art trong nhiều bài toán structured data

Nó thường được dùng để cải thiện kết quả sau baseline.

***

### Ví dụ

Dự đoán giá nhà:

* Diện tích
* Vị trí
* Số phòng
* Năm xây dựng

XGBoost sẽ tạo nhiều cây nhỏ, mỗi cây sửa lỗi của cây trước.

***

## So sánh vai trò baseline giữa ANN, SVM và XGBoost

| Model        | Có thường là baseline không? | Độ phức tạp |
| ------------ | ---------------------------- | ----------- |
| ANN          | Không                        | Trung – Cao |
| SVM (linear) | Có thể                       | Trung       |
| XGBoost      | Không                        | Cao         |

***

## Kết luận

Trong thực hành Machine Learning:

1. Baseline thường là:
   * Logistic Regression
   * Decision Tree đơn giản
   * Linear SVM
2. ANN và XGBoost thường được dùng để:
   * So sánh
   * Cải thiện
   * Tối ưu hiệu suất


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://deeplearningcoban.gitbook.io/deeplearningcoban.com/tham-khao/glossary/x/xgboost.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
