Class ClusterStatistics

    • Constructor Detail

      • ClusterStatistics

        public ClusterStatistics()
    • Method Detail

      • createOutputFormat

        protected weka.core.Instances createOutputFormat​(weka.core.Instances data)
        Generates the output format (additional attribute for cluster index).
        Parameters:
        data - the original input data
        Returns:
        the header of the output format
      • createRow

        protected weka.core.DenseInstance createRow​(int index,
                                                    String statistic,
                                                    weka.core.Instances data)
        Creates a new stats row.
        Parameters:
        index - the cluster index
        statistic - the statistic's name
        data - the data format
        Returns:
        the generated row
      • calculateStatistics

        protected weka.core.Instances calculateStatistics​(weka.core.Instances data,
                                                          weka.clusterers.Clusterer clusterer,
                                                          weka.core.Instances outputFormat)
        Calculates the statistics.
        Parameters:
        data - the input data used for training the clusterer
        clusterer - the built clusterer
        outputFormat - the format to use for the output
        Returns:
        the generated output