Package moa.cluster

Class Cluster

    • Constructor Detail

      • Cluster

        public Cluster()
    • Method Detail

      • getCenter

        public abstract double[] getCenter()
        Returns:
        the center of the cluster
      • getWeight

        public abstract double getWeight()
        Returns the weight of this cluster, not neccessarily normalized. It could, for instance, simply return the number of points contined in this cluster.
        Returns:
        the weight
      • getInclusionProbability

        public abstract double getInclusionProbability​(Instance instance)
        Returns the probability of the given point belonging to this cluster.
        Parameters:
        instance -
        Returns:
        a value between 0 and 1
      • getDescription

        public void getDescription​(StringBuilder sb,
                                   int i)
        Description copied from interface: MOAObject
        Returns a string representation of this object. Used in AbstractMOAObject.toString to give a string representation of the object.
        Parameters:
        sb - the stringbuilder to add the description
        i - the number of characters to indent
      • setId

        public void setId​(double id)
      • getId

        public double getId()
      • isGroundTruth

        public boolean isGroundTruth()
      • setGroundTruth

        public void setGroundTruth​(double truth)
      • getGroundTruth

        public double getGroundTruth()
      • sample

        public abstract Instance sample​(Random random)
        Samples this cluster by returning a point from inside it.
        Parameters:
        random - a random number source
        Returns:
        an Instance that lies inside this cluster
      • setMeasureValue

        public void setMeasureValue​(String measureKey,
                                    String value)
      • setMeasureValue

        public void setMeasureValue​(String measureKey,
                                    double value)
      • getMeasureValue

        public String getMeasureValue​(String measureKey)
      • getInfo

        public String getInfo()