Class ClusKernel

    • Constructor Detail

      • ClusKernel

        public ClusKernel​(double[] point,
                          int dim)
        A constructor that makes a Kernel which just represents the given point.
        Parameters:
        point - The point to be converted into a corresponding Kernel.
        dim - The number of classes possible for points in this experiment(Tree).
      • ClusKernel

        protected ClusKernel​(int numberDimensions)
        Constructor of the Cluster.
        Parameters:
        numberDimensions - Dimensionality of the points added that can be added to this cluster experiment(Tree).
      • ClusKernel

        protected ClusKernel​(ClusKernel other)
        Instantiates a copy of the given cluster.
        Parameters:
        other - The Cluster of which we make a copy.
    • Method Detail

      • add

        public void add​(ClusKernel other)
        Adds the given cluster to this cluster, without making this cluster older.
        Parameters:
        other -
      • aggregate

        protected void aggregate​(ClusKernel other,
                                 long timeDifference,
                                 double negLambda)
        Make this cluster older bei weighting it and add to this cluster the given cluster. If we want to add somethin to the cluster, but don't want to weight it, we should use the function add(Cluster).
        Parameters:
        other - The other cluster to be added to this one.
        timeDifference - The time elapsed between the last update of the Entry to which this cluster belongs and the update that caused the call to this function.
        negLambda - A parameter needed to weight the cluster.
        See Also:
        add(ClusKernel)
      • makeOlder

        protected void makeOlder​(long timeDifference,
                                 double negLambda)
        Make this cluster older. This means multiplying weighted N, LS and SS with a weight factor given by the time difference and the parameter negLambda.
        Parameters:
        timeDifference - The time elapsed between this current update and the last one.
        negLambda -
      • calcDistance

        public double calcDistance​(ClusKernel other)
        Calculate the distance to this other cluster. The other cluster is normaly just a single data point(i.e. N = 1).
        Parameters:
        other - The other cluster to which the distance is calculated.
        Returns:
        The distance between this cluster and the other.
      • isEmpty

        protected boolean isEmpty()
        Check if this cluster is empty or not.
        Returns:
        true if the cluster has no data points, false otherwise.
      • clear

        protected void clear()
        Remove all points from this cluster.
      • overwriteOldCluster

        protected void overwriteOldCluster​(ClusKernel other)
        Overwrites the LS, SS and weightedN in this cluster to the values of the given cluster but adds N and classCount of the given cluster to this one. This function is useful when the weight of an entry becomes to small, and we want to forget the information of the old points.
        Parameters:
        other - The cluster that should overwrite the information.
      • getCenter

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

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

        public double[] getVarianceVector()