0
0
ML Pythonml~5 mins

XGBoost in ML Python - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does XGBoost stand for and what is its main purpose?
XGBoost stands for eXtreme Gradient Boosting. It is a machine learning method used to build strong predictive models by combining many weak models, usually decision trees, to improve accuracy.
Click to reveal answer
beginner
How does XGBoost improve model performance compared to a single decision tree?
XGBoost builds many trees sequentially. Each new tree tries to fix errors made by previous trees. This process, called boosting, helps the model learn from mistakes and become more accurate.
Click to reveal answer
intermediate
What is the role of the learning rate in XGBoost?
The learning rate controls how much each new tree influences the overall model. A smaller learning rate means the model learns slowly but can be more accurate, while a larger rate learns faster but risks overfitting.
Click to reveal answer
intermediate
Explain the concept of regularization in XGBoost.
Regularization in XGBoost adds a penalty for complex trees to prevent overfitting. It helps the model generalize better to new data by keeping trees simpler and avoiding fitting noise.
Click to reveal answer
beginner
What metrics can you use to evaluate an XGBoost model for classification?
Common metrics include accuracy (how many predictions are correct), precision (correct positive predictions), recall (how many actual positives were found), and AUC-ROC (how well the model separates classes).
Click to reveal answer
What type of models does XGBoost primarily use to build its ensemble?
ADecision trees
BNeural networks
CSupport vector machines
DK-nearest neighbors
What is the main goal of boosting in XGBoost?
ATo speed up training by using fewer trees
BTo reduce the size of the dataset
CTo combine weak models to create a strong model
DTo cluster data points
Which hyperparameter in XGBoost controls how much each tree contributes to the final prediction?
Asubsample
Bmax_depth
Cn_estimators
Dlearning_rate
What does regularization help prevent in XGBoost models?
AUnderfitting
BOverfitting
CData leakage
DData imbalance
Which metric is best to evaluate how well an XGBoost model separates two classes?
AAUC-ROC
BMean squared error
CAccuracy
DConfusion matrix
Describe how XGBoost builds its model step-by-step and why this helps improve accuracy.
Think about how each new tree learns from mistakes of earlier trees.
You got /4 concepts.
    Explain the importance of tuning hyperparameters like learning rate and max_depth in XGBoost.
    Consider how these settings affect learning speed and model complexity.
    You got /4 concepts.