MOA 12.03
Real Time Analytics for Data Streams
|
Representation of an Entry in the tree. More...
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. |
Representation of an Entry in the tree.
Definition at line 32 of file ClusKernel.java.
moa.clusterers.clustree.ClusKernel.ClusKernel | ( | double[] | point, |
int | dim | ||
) |
A constructor that makes a Kernel which just represents the given point.
point | The point to be converted into a corresponding Kernel. |
numberClasses | The 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.
numberDimensions | Dimensionality of the points added that can be added to this cluster |
numberClasses | The 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.
other | The Cluster of which we make a copy. |
Definition at line 75 of file ClusKernel.java.
void moa.clusterers.clustree.ClusKernel.add | ( | ClusKernel | other | ) |
Adds the given cluster to this cluster, without making this cluster older.
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().
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)
.
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. |
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().
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).
other | The other cluster to which the distance is calculated. |
Definition at line 133 of file ClusKernel.java.
Referenced by moa.clusterers.clustree.Entry.calcDistance().
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().
double [] moa.clusterers.clustree.ClusKernel.getCenter | ( | ) | [virtual] |
Reimplemented from moa.cluster.CFCluster.
Definition at line 209 of file ClusKernel.java.
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.
point |
Implements moa.cluster.CFCluster.
Definition at line 231 of file ClusKernel.java.
double moa.clusterers.clustree.ClusKernel.getRadius | ( | ) | [virtual] |
See interface Cluster
Implements moa.cluster.CFCluster.
Definition at line 263 of file ClusKernel.java.
Referenced by moa.clusterers.clustree.ClusKernel.getInclusionProbability().
double moa.clusterers.clustree.ClusKernel.getWeight | ( | ) | [virtual] |
See interface Cluster
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().
boolean moa.clusterers.clustree.ClusKernel.isEmpty | ( | ) | [protected] |
Check if this cluster is empty or not.
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().
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.
timeDifference | The 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().
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.
other | The cluster that should overwrite the information. |
Definition at line 186 of file ClusKernel.java.
Referenced by moa.clusterers.clustree.Entry.overwriteOldEntry().
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.