XGBoost in practice
After we have successfully built and installed the library, we can use it for creating machine learning models, and in this chapter we will cover three cases: binary classification, regression, and learning to rank models. We will also talk about the familiar use cases: predicting whether a URL is on the first page or search engine results, predicting the performance of a computer, and ranking for our own search engine.Â
XGBoost for classification
Now let's finally use it for solving a classification problem! In Chapter 4, Supervised Learning - Classification and Regression, we tried to predict whether a URL is likely to appear on the first page of search results or not. Previously, we created a special object for keeping the features:
public class RankedPage { Â Â Â private String url; Â Â Â private int position; Â Â Â private int page; Â Â Â private int titleLength; Â Â Â private int bodyContentLength; Â Â Â private boolean queryInTitle; Â Â Â private int numberOfHeaders; Â Â Â private...