net.sf.jdmf.visualization.clustering
Class ChartGenerator

java.lang.Object
  extended by net.sf.jdmf.visualization.clustering.ChartGenerator

public class ChartGenerator
extends java.lang.Object

Generates various charts using JFreeChart based on the output data.

Author:
quorthon

Constructor Summary
ChartGenerator()
           
 
Method Summary
 org.jfree.chart.JFreeChart generatePieChart(java.util.List<Cluster> clusters)
          Generates a pie chart showing the percentage of points falling into each cluster.
 org.jfree.chart.JFreeChart generateXYChart(java.util.List<Cluster> clusters, java.lang.Integer firstAttributeIndex, java.lang.String firstAttributeName, java.lang.Integer secondAttributeIndex, java.lang.String secondAttributeName)
          Generates a XY chart visualizing the clusters found by a clustering algorithm.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartGenerator

public ChartGenerator()
Method Detail

generateXYChart

public org.jfree.chart.JFreeChart generateXYChart(java.util.List<Cluster> clusters,
                                                  java.lang.Integer firstAttributeIndex,
                                                  java.lang.String firstAttributeName,
                                                  java.lang.Integer secondAttributeIndex,
                                                  java.lang.String secondAttributeName)
Generates a XY chart visualizing the clusters found by a clustering algorithm. Limited to two dimensions (because the chart is 2D).

Parameters:
clusters - clusters found by a clustering algorithm
firstAttributeIndex - the index of the 1st dimension to visualize
firstAttributeName - the name of the 1st dimension to visualize
secondAttributeIndex - the index of the 2nd dimension to visualize
secondAttributeName - the name of the 2nd dimension to visualize
Returns:
a 2D XY chart visualizing the clusters found

generatePieChart

public org.jfree.chart.JFreeChart generatePieChart(java.util.List<Cluster> clusters)
Generates a pie chart showing the percentage of points falling into each cluster.

Parameters:
clusters - clusters found by a clustering algorithm
Returns:
a pie chart showing the distribution of points into clusters