Class GeneratorMain.AssignLabelsByDistance

  • Enclosing class:
    GeneratorMain

    private class GeneratorMain.AssignLabelsByDistance
    extends java.lang.Object
    Reassign objects in certain labels; but also always test against the model.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double[][] centers
      Cluster centers.
    • Constructor Summary

      Constructors 
      Constructor Description
      AssignLabelsByDistance​(elki.data.ClassLabel[] labels)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private double[][] clusterCenters​(java.util.ArrayList<GeneratorInterface> generators, elki.data.ClassLabel[] labels)
      Compute the cluster centers for each cluster.
      int getAssignment​(int i, double[] p)
      Assign a point to a cluster.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • centers

        private double[][] centers
        Cluster centers.
    • Constructor Detail

      • AssignLabelsByDistance

        public AssignLabelsByDistance​(elki.data.ClassLabel[] labels)
        Constructor.
        Parameters:
        labels - Cluster labels
    • Method Detail

      • clusterCenters

        private double[][] clusterCenters​(java.util.ArrayList<GeneratorInterface> generators,
                                          elki.data.ClassLabel[] labels)
        Compute the cluster centers for each cluster.
        Parameters:
        generators - Generators
        labels - Labels (null if not needed)
        Returns:
        Cluster centers