xgboost

Gradient boosting library for machine learning model training

brewmacoslinux
Try with needOr install directly
Source

About

Scalable, Portable and Distributed Gradient Boosting Library

Examples

train a gradient boosting model on tabular data$ python3 -c "import xgboost as xgb; dtrain = xgb.DMatrix('train.csv'); model = xgb.train({}, dtrain)"
make predictions with a trained xgboost model$ python3 -c "import xgboost as xgb; model = xgb.Booster(model_file='model.bin'); predictions = model.predict(xgb.DMatrix('test.csv'))"
tune hyperparameters for better model performance$ python3 -c "import xgboost as xgb; from sklearn.model_selection import GridSearchCV; xgb_model = xgb.XGBRegressor(); GridSearchCV(xgb_model, {'max_depth': [3,5,7]}).fit(X, y)"
cross validate a gradient boosting model$ python3 -c "import xgboost as xgb; xgb.cv({'max_depth': 5}, xgb.DMatrix('data.csv'), num_boost_round=100, nfold=5)"
save and load trained xgboost models$ python3 -c "import xgboost as xgb; model.save_model('model.bin'); loaded = xgb.Booster(model_file='model.bin')"