Installing XGBoost on Ubuntu

December 9, 2015

(This article was first published on Exegetic Analytics » R, and kindly contributed to R-bloggers)


XGBoost is the flavour of the moment for serious competitors on kaggle. It was developed by Tianqi Chen and provides a particularly efficient implementation of the Gradient Boosting algorithm. Although there is a CLI implementation of XGBoost you’ll probably be more interested in using it from either R or Python. Below are instructions for getting it installed for each of these languages. It’s pretty painless.

Installing XGBoost in R

Installation in R is extremely simple.

> install.packages('xgboost')
> library(xgboost)

XGBoost is also supported as a model in caret, which is especially handy for feature selection and model parameter tuning.

Installing XGBoost in Python

Download the latest version of XGBoost from the github repository. The simplest way to do this is to grab the master zip archive. Unpack the archive, then become root and then execute the following:

# cd xgboost-master
# make
# cd python-package/
# python install --user

And you’re ready to roll:

import xgboost


Enjoy building great models with the absurdly powerful tool. I’ve found that it effortlessly consumes vast data sets that grind other algorithms to a halt. Get started by looking at some code examples. Also worth looking at are

The post Installing XGBoost on Ubuntu appeared first on Exegetic Analytics.

To leave a comment for the author, please follow the link and comment on their blog: Exegetic Analytics » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)