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 int numberOfLinks;    public boolean isHttps();    public boolean isComDomain();    public boolean isOrgDomain();    public boolean isNetDomain();    public int getNumberOfSlashes();}

As you can see, there are a number of features, ...

Get Java: Data Science Made Easy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.