MOA 12.03
Real Time Analytics for Data Streams
moa.clusterers.clustree.ClusKernel Class Reference

Representation of an Entry in the tree. More...

Inheritance diagram for moa.clusterers.clustree.ClusKernel:
Collaboration diagram for moa.clusterers.clustree.ClusKernel:

List of all members.

Public Member Functions

 ClusKernel (double[] point, int dim)
 A constructor that makes a Kernel which just represents the given point.
void add (ClusKernel other)
 Adds the given cluster to this cluster, without making this cluster older.
double calcDistance (ClusKernel other)
 Calculate the distance to this other cluster.
double getWeight ()
 See interface Cluster
CFCluster getCF ()
double[] getCenter ()
double getInclusionProbability (Instance instance)
 Returns the probability of the given point belonging to this cluster.
double getRadius ()
 See interface Cluster

Static Public Attributes

static final double EPSILON = 0.00000001
 Numeric epsilon.
static final double MIN_VARIANCE = 1e-50

Protected Member Functions

 ClusKernel (int numberDimensions)
 Constructor of the Cluster.
 ClusKernel (ClusKernel other)
 Instantiates a copy of the given cluster.
void aggregate (ClusKernel other, long timeDifference, double negLambda)
 Make this cluster older bei weighting it and add to this cluster the given cluster.
void makeOlder (long timeDifference, double negLambda)
 Make this cluster older.
boolean isEmpty ()
 Check if this cluster is empty or not.
void clear ()
 Remove all points from this cluster.
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.

Detailed Description

Representation of an Entry in the tree.

Definition at line 32 of file ClusKernel.java.


Constructor & Destructor Documentation

moa.clusterers.clustree.ClusKernel.ClusKernel ( double[]  point,
int  dim 
)

A constructor that makes a Kernel which just represents the given point.

Parameters:
pointThe point to be converted into a corresponding Kernel.
numberClassesThe number of classes possible for points in this experiment(Tree).

Definition at line 54 of file ClusKernel.java.

moa.clusterers.clustree.ClusKernel.ClusKernel ( int  numberDimensions) [protected]

Constructor of the Cluster.

Parameters:
numberDimensionsDimensionality of the points added that can be added to this cluster
numberClassesThe number of classes possible for points in this experiment(Tree).

Definition at line 66 of file ClusKernel.java.

moa.clusterers.clustree.ClusKernel.ClusKernel ( ClusKernel  other) [protected]

Instantiates a copy of the given cluster.

Parameters:
otherThe Cluster of which we make a copy.

Definition at line 75 of file ClusKernel.java.


Member Function Documentation

void moa.clusterers.clustree.ClusKernel.add ( ClusKernel  other)

Adds the given cluster to this cluster, without making this cluster older.

Parameters:
other

Definition at line 85 of file ClusKernel.java.

Referenced by moa.clusterers.clustree.Entry.add(), moa.clusterers.clustree.ClusKernel.aggregate(), moa.clusterers.clustree.Entry.Entry(), moa.clusterers.clustree.Entry.initializeEntry(), moa.clusterers.clustree.Entry.mergeWith(), and moa.clusterers.clustree.Entry.recalculateData().

Here is the caller graph for this function:

void moa.clusterers.clustree.ClusKernel.aggregate ( ClusKernel  other,
long  timeDifference,
double  negLambda 
) [protected]

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:
otherThe other cluster to be added to this one.
timeDifferenceThe time elapsed between the last update of the Entry to which this cluster belongs and the update that caused the call to this function.
negLambdaA parameter needed to weight the cluster.
See also:
add(tree.Kernel)

Definition at line 101 of file ClusKernel.java.

Referenced by moa.clusterers.clustree.Entry.aggregateCluster(), moa.clusterers.clustree.Entry.aggregateEntry(), and moa.clusterers.clustree.Entry.aggregateToBuffer().

Here is the call graph for this function:

Here is the caller graph for this function:

double moa.clusterers.clustree.ClusKernel.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:
otherThe other cluster to which the distance is calculated.
Returns:
The distance between this cluster and the other.

Definition at line 133 of file ClusKernel.java.

Referenced by moa.clusterers.clustree.Entry.calcDistance().

Here is the call graph for this function:

Here is the caller graph for this function:

void moa.clusterers.clustree.ClusKernel.clear ( ) [protected]

Remove all points from this cluster.

Definition at line 172 of file ClusKernel.java.

Referenced by moa.clusterers.clustree.Entry.clear(), moa.clusterers.clustree.Entry.emptyBuffer(), moa.clusterers.clustree.Entry.recalculateData(), and moa.clusterers.clustree.Entry.shallowClear().

Here is the caller graph for this function:

double [] moa.clusterers.clustree.ClusKernel.getCenter ( ) [virtual]
Returns:
this kernels' center

Reimplemented from moa.cluster.CFCluster.

Definition at line 209 of file ClusKernel.java.

Here is the call graph for this function:

CFCluster moa.clusterers.clustree.ClusKernel.getCF ( ) [virtual]

Implements moa.cluster.CFCluster.

Definition at line 201 of file ClusKernel.java.

double moa.clusterers.clustree.ClusKernel.getInclusionProbability ( Instance  instance) [virtual]

Returns the probability of the given point belonging to this cluster.

Parameters:
point
Returns:
a value between 0 and 1

Implements moa.cluster.CFCluster.

Definition at line 231 of file ClusKernel.java.

Here is the call graph for this function:

double moa.clusterers.clustree.ClusKernel.getRadius ( ) [virtual]

See interface Cluster

Returns:
The radius of the cluster.
See also:
Cluster.getRadius()

Implements moa.cluster.CFCluster.

Definition at line 263 of file ClusKernel.java.

Referenced by moa.clusterers.clustree.ClusKernel.getInclusionProbability().

Here is the caller graph for this function:

double moa.clusterers.clustree.ClusKernel.getWeight ( ) [virtual]

See interface Cluster

Returns:
The weight.
See also:
Cluster.getWeight()

Reimplemented from moa.cluster.CFCluster.

Definition at line 195 of file ClusKernel.java.

Referenced by moa.clusterers.clustree.ClusKernel.calcDistance(), moa.clusterers.clustree.ClusKernel.getCenter(), and moa.clusterers.clustree.Entry.isIrrelevant().

Here is the caller graph for this function:

boolean moa.clusterers.clustree.ClusKernel.isEmpty ( ) [protected]

Check if this cluster is empty or not.

Returns:
true if the cluster has no data points, false otherwise.

Definition at line 165 of file ClusKernel.java.

Referenced by moa.clusterers.clustree.ClusKernel.getCenter(), moa.clusterers.clustree.Entry.initializeEntry(), moa.clusterers.clustree.Entry.isEmpty(), moa.clusterers.clustree.Entry.mergeWith(), and moa.clusterers.clustree.Entry.overwriteOldEntry().

Here is the caller graph for this function:

void moa.clusterers.clustree.ClusKernel.makeOlder ( long  timeDifference,
double  negLambda 
) [protected]

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:
timeDifferenceThe time elapsed between this current update and the last one.
negLambda

Definition at line 114 of file ClusKernel.java.

Referenced by moa.clusterers.clustree.ClusKernel.aggregate(), moa.clusterers.clustree.Entry.emptyBuffer(), and moa.clusterers.clustree.Entry.makeOlder().

Here is the caller graph for this function:

void moa.clusterers.clustree.ClusKernel.overwriteOldCluster ( ClusKernel  other) [protected]

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:
otherThe cluster that should overwrite the information.

Definition at line 186 of file ClusKernel.java.

Referenced by moa.clusterers.clustree.Entry.overwriteOldEntry().

Here is the caller graph for this function:


Member Data Documentation

final double moa.clusterers.clustree.ClusKernel.EPSILON = 0.00000001 [static]

Numeric epsilon.

Definition at line 36 of file ClusKernel.java.

Referenced by moa.clusterers.clustree.ClusKernel.getInclusionProbability().

final double moa.clusterers.clustree.ClusKernel.MIN_VARIANCE = 1e-50 [static]

Definition at line 37 of file ClusKernel.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations