Machine learning models - GuangyuMEN/becoming-data-scientist... GitHub Wiki
XGBoost:
for standard tabular data, store in Pandas DataFrames
implementation of the Gradient Boosted Decision Trees algorithm:
mechanism:
Need some base prediction to start the cycle. Go through cycles to builds new models and combines them into an ensemble model. We start the cycle by calculating the errors for each observation in the dataset. We then build a new model to predict those. We add predictions from this error-predicting model to the "ensemble of models."To make a prediction, we add the predictions from all previous models. We can use these predictions to calculate new errors, build the next model, and add it to the ensemble.
important parameters:n_estimators Too low a value causes underfitting, which is inaccurate predictions on both training data and new data. Too large a value causes overfitting, which is accurate predictions on training data, but inaccurate predictions on new data. early_stopping_rounds = 5 is a reasonable value. In general, a small learning rate (and large number of estimators) will yield more accurate XGBoost models