Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Java for Data Science

You're reading from   Mastering Java for Data Science Analytics and more for production-ready applications

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781782174271
Length 364 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alexey Grigorev Alexey Grigorev
Author Profile Icon Alexey Grigorev
Alexey Grigorev
Arrow right icon
View More author details
Toc

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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image