Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

3. Discovering Groups > Drawing the Dendrogram

Drawing the Dendrogram

You can interpret the clusters more clearly by viewing them as a dendrogram. Hierarchical clustering results are usually viewed this way, since dendrograms pack a lot of information into a relatively small space. Since the dendrograms will be graphical and saved as JPGs, you’ll need to download the Python Imaging Library (PIL), which is available at http://pythonware.com.

This library comes with an installer for Windows and source distributions for other platforms. More information on downloading and installing the PIL is available in Appendix A. The PIL makes it very easy to generate images with text and lines, which is all you’ll really need to construct a dendrogram. Add the import statement to the beginning of clusters.py:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint