Book Image

Machine Learning in Java - Second Edition

By : AshishSingh Bhatia, Bostjan Kaluza
Book Image

Machine Learning in Java - Second Edition

By: AshishSingh Bhatia, Bostjan Kaluza

Overview of this book

As the amount of data in the world continues to grow at an almost incomprehensible rate, being able to understand and process data is becoming a key differentiator for competitive organizations. Machine learning applications are everywhere, from self-driving cars, spam detection, document search, and trading strategies, to speech recognition. This makes machine learning well-suited to the present-day era of big data and Data Science. The main challenge is how to transform data into actionable knowledge. Machine Learning in Java will provide you with the techniques and tools you need. You will start by learning how to apply machine learning methods to a variety of common tasks including classification, prediction, forecasting, market basket analysis, and clustering. The code in this book works for JDK 8 and above, the code is tested on JDK 11. Moving on, you will discover how to detect anomalies and fraud, and ways to perform activity recognition, image recognition, and text analysis. By the end of the book, you will have explored related web resources and technologies that will help you take your learning to the next level. By applying the most effective machine learning methods to real-world problems, you will gain hands-on experience that will transform the way you think about data.
Table of Contents (13 chapters)

Installing Mallet

Mallet is available for download at the UMass Amherst University website at http://mallet.cs.umass.edu/download.php. Navigate to the Download section as shown in the following screenshot and select the latest stable release (2.0.8, at the time of writing this book):

Download the ZIP file and extract the content. In the extracted directory, you should find a folder named dist with two JAR files: mallet.jar and mallet-deps.jar. The first one contains all of the packaged Mallet classes, while the second one packs all of the dependencies. We will include both JARs files in your project as referenced libraries, as shown in the following screenshot:

If you are using Eclipse, right-click on Project, select Properties, and pick Java Build Path. Select the Libraries tab and click Add External JARs. Now, select the two JARs files and confirm, as shown in the following...