Package moa.cluster

Class CFCluster

    • Field Detail

      • radiusFactor

        protected double radiusFactor
      • N

        protected double N
        Number of points in the cluster.
      • LS

        public double[] LS
        Linear sum of all the points added to the cluster.
      • SS

        public double[] SS
        Squared sum of all the points added to the cluster.
    • Constructor Detail

      • CFCluster

        public CFCluster​(Instance instance,
                         int dimensions)
        Instantiates an empty kernel with the given dimensionality.
        Parameters:
        dimensions - The number of dimensions of the points that can be in this kernel.
      • CFCluster

        protected CFCluster​(int dimensions)
      • CFCluster

        public CFCluster​(double[] center,
                         int dimensions)
      • CFCluster

        public CFCluster​(CFCluster cluster)
    • Method Detail

      • add

        public void add​(CFCluster cluster)
      • getCenter

        public double[] getCenter()
        Overrides:
        getCenter in class SphereCluster
        Returns:
        this kernels' center
      • getInclusionProbability

        public abstract double getInclusionProbability​(Instance instance)
        Description copied from class: Cluster
        Returns the probability of the given point belonging to this cluster.
        Overrides:
        getInclusionProbability in class SphereCluster
        Returns:
        a value between 0 and 1
      • getRadius

        public abstract double getRadius()
        See interface Cluster
        Overrides:
        getRadius in class SphereCluster
        Returns:
        The radius of the cluster.
      • setN

        public void setN​(double N)
      • getN

        public double getN()
      • addVectors

        public static void addVectors​(double[] a1,
                                      double[] a2)
        Adds the second array to the first array element by element. The arrays must have the same length.
        Parameters:
        a1 - Vector to which the second vector is added.
        a2 - Vector to be added. This vector does not change.