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...