Documentation of 'ca.pfv.spmf.algorithms.clustering.hierarchical_clustering.AlgoHierarchicalClustering' Java class
AlgoHierarchicalClustering
ca.pfv.spmf.algorithms.clustering.hierarchical_clustering

Class AlgoHierarchicalClustering



  • public class AlgoHierarchicalClustering
    extends java.lang.Object
    This is an implementation of generic Hierarchical Clustering Algorithm as described in this webpage: http://home.dei.polimi.it/matteucc/Clustering/tutorial_html/hierarchical.html

    This is a Hierarchical Clustering with a constant "threshold" that indicate the maximal distance between two clusters to group them. The algorithm stops when no cluster can be merged.

    The distance between two clusters is calculated as the distance between the medians of the two clusters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void printStatistics()
      Print statistics about the latest execution to System.out.
      java.util.List<Cluster> runAlgorithm(java.lang.String inputFile, double maxDistance)
      Run the algorithm.
      void saveToFile(java.lang.String output)
      Save the clusters to an output file
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AlgoHierarchicalClustering

        public AlgoHierarchicalClustering()
        Default constructor
    • Method Detail

      • runAlgorithm

        public java.util.List<Cluster> runAlgorithm(java.lang.String inputFile,
                                                    double maxDistance)
                                             throws java.lang.NumberFormatException,
                                                    java.io.IOException
        Run the algorithm.
        Parameters:
        inputFile - an input file containing vectors of doubles
        maxDistance - the maximum distance allowed for merging two clusters
        Returns:
        a list of Clusters
        Throws:
        java.io.IOException - exception if error while reading the file
        java.lang.NumberFormatException
      • saveToFile

        public void saveToFile(java.lang.String output)
                        throws java.io.IOException
        Save the clusters to an output file
        Parameters:
        output - the output file path
        Throws:
        java.io.IOException - exception if there is some writing error.
      • printStatistics

        public void printStatistics()
        Print statistics about the latest execution to System.out.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.