Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Apache Mahout
  • Table Of Contents Toc
Learning Apache Mahout

Learning Apache Mahout

By : Chandramani Tiwary
3 (1)
close
close
Learning Apache Mahout

Learning Apache Mahout

3 (1)
By: Chandramani Tiwary

Overview of this book

If you are a Java developer and want to use Mahout and machine learning to solve Big Data Analytics use cases then this book is for you. Familiarity with shell scripts is assumed but no prior experience is required.
Table of Contents (12 chapters)
close
close
Lock Free Chapter
1
1. Introduction to Mahout
9
9. Case Study – Churn Analytics and Customer Segmentation
11
Index

A Mahout Java example


We will now discuss how to use the clustering algorithm discussed in Java code. Open the MahoutClusteringExample.java file from the chapter7.src package.

k-means

Define the distance measure to be used by the k-means clustering algorithm:

DistanceMeasure measure = new EuclideanDistanceMeasure();

We create the Path variable to the input sequence directory created in the preprocessing step:

Path inputSeq = newPath("clustering_seq")

The next step is to generate the random initial cluster seeds. We create the output directory path, where we save the initial cluster points. The path constructor with two arguments creates a folder with the name of the second argument inside the directory of the first argument. You could use a separate directory for the initial cluster directory too:

Path clusters = newPath(inputSeq, "random-seeds")

The RandomSeedGenerator class has the buildRandom()function for that. It takes as input the Configuration object, the input directory with the sequence...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Apache Mahout
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon