Reader small image

You're reading from  Apache Mahout Essentials

Product typeBook
Published inJun 2015
Reading LevelIntermediate
Publisher
ISBN-139781783554997
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Jayani Withanawasam
Jayani Withanawasam
author image
Jayani Withanawasam

Jayani Withanawasam is R&D engineer and a senior software engineer at Zaizi Asia, where she focuses on applying machine learning techniques to provide smart content management solutions. She is currently pursuing an MSc degree in artificial intelligence at the University of Moratuwa, Sri Lanka, and has completed her BE in software engineering (with first class honors) from the University of Westminster, UK. She has more than 6 years of industry experience, and she has worked in areas such as machine learning, natural language processing, and semantic web technologies during her tenure. She is passionate about working with semantic technologies and big data.
Read more about Jayani Withanawasam

Right arrow

A visualization example for K-Means clustering


In this example, we demonstrate the visualization of clusters in K-Means clustering. We use the same example as that given in Chapter 2, Clustering, K-Means clustering section (Clustering people based on height and weight).

Follow the given step-by-step guide to come up with a visualization for the previous example using D3.js:

  1. Download the D3.js JavaScript file from https://github.com/mbostock/d3/releases.

  2. You can directly use the web reference as well from http://d3js.org/d3.v3.min.js.

  3. Create a basic HTML file named kmeans.html using any text editor, as follows:

    Note

    Save kmeans.html in the same directory as the one in which d3.v3.min.js resides, or give the path accordingly if you are referencing D3.js as a local resource.

    <html>
      <head><meta charset="utf-8"></head>
      <body>
      </body>
    </html>
  4. Add D3.js as a reference in the HTML header, as shown here:

    <head>
      <meta charset="utf-8">
      <script...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Apache Mahout Essentials
Published in: Jun 2015Publisher: ISBN-13: 9781783554997

Author (1)

author image
Jayani Withanawasam

Jayani Withanawasam is R&D engineer and a senior software engineer at Zaizi Asia, where she focuses on applying machine learning techniques to provide smart content management solutions. She is currently pursuing an MSc degree in artificial intelligence at the University of Moratuwa, Sri Lanka, and has completed her BE in software engineering (with first class honors) from the University of Westminster, UK. She has more than 6 years of industry experience, and she has worked in areas such as machine learning, natural language processing, and semantic web technologies during her tenure. She is passionate about working with semantic technologies and big data.
Read more about Jayani Withanawasam