Skip to Content
Machine Learning in Java - Second Edition
book

Machine Learning in Java - Second Edition

by AshishSingh Bhatia, Bostjan Kaluza
November 2018
Intermediate to advanced
300 pages
7h 42m
English
Packt Publishing
Content preview from Machine Learning in Java - Second Edition

Loading data from a database

Alternatively, we can load the data from a database using one of the JDBC data models. In this chapter, we will not dive into the detailed instructions of how to set up a database, connections, and so on, but we will give a sketch of how this can be done.

Database connectors have been moved to a separate package, mahout-integration; hence, we have to add the package to our dependency list. Open the pom.xml file and add the following dependency:

<dependency> 
  <groupId>org.apache.mahout</groupId> 
  <artifactId>mahout-integration</artifactId> 
  <version>0.7</version> 
</dependency> 

Consider that we want to connect to a MySQL database. In this case, we will also need a package that handles database connections. Add the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Java Machine Learning

Mastering Java Machine Learning

Uday Kamath, Krishna Choppella
Java: Data Science Made Easy

Java: Data Science Made Easy

Richard M. Reese, Jennifer L. Reese, Alexey Grigorev

Publisher Resources

ISBN: 9781788474399Supplemental Content