Book Image

Mastering Java for Data Science

By : Alexey Grigorev
Book Image

Mastering Java for Data Science

By: Alexey Grigorev

Overview of this book

Java is the most popular programming language, according to the TIOBE index, and it is a typical choice for running production systems in many companies, both in the startup world and among large enterprises. Not surprisingly, it is also a common choice for creating data science applications: it is fast and has a great set of data processing tools, both built-in and external. What is more, choosing Java for data science allows you to easily integrate solutions with existing software, and bring data science into production with less effort. This book will teach you how to create data science applications with Java. First, we will revise the most important things when starting a data science application, and then brush up the basics of Java and machine learning before diving into more advanced topics. We start by going over the existing libraries for data processing and libraries with machine learning algorithms. After that, we cover topics such as classification and regression, dimensionality reduction and clustering, information retrieval and natural language processing, and deep learning and big data. Finally, we finish the book by talking about the ways to deploy the model and evaluate it in production settings.
Table of Contents (17 chapters)
Title Page
About the Author
About the Reviewers
Customer Feedback

Chapter 4. Supervised Learning - Classification and Regression

In previous chapters, we looked at how to pre-process data in Java and how to do Exploratory Data Analysis. Now, as we covered the foundation, we are ready to start creating machine learning models.

First, we start with supervised learning. In the supervised settings, we have some information attached to each observation, called labels, and we want to learn from it, and predict it for observations without labels.

There are two types of labels: the first are discrete and finite, such as true/false or buy/sell, and the second are continuous, such as salary or temperature. These types correspond to two types of supervised learning: classification and regression. We will talk about them in this chapter.

This chapter covers the following points:

  • Classification problems
  • Regression problems
  • Evaluation metrics for each type
  • An overview of the available implementations in Java

By the end of this chapter, you will know how to use Smile, LIBLINEAR...