MOA 12.03
Real Time Analytics for Data Streams
moa.clusterers.CobWeb Class Reference
Inheritance diagram for moa.clusterers.CobWeb:
Collaboration diagram for moa.clusterers.CobWeb:

List of all members.

Classes

class  CNode
 Inner class handling node operations for Cobweb.

Public Member Functions

void resetLearningImpl ()
void trainOnInstanceImpl (Instance newInstance)
 Adds an instance to the clusterer.
double[] getVotesForInstance (Instance instance)
 Classifies a given instance.
int numberOfClusters ()
 Returns the number of clusters.
void getModelDescription (StringBuilder out, int indent)
boolean isRandomizable ()
String graph ()
 Generates the graph string of the Cobweb tree.
void setAcuity (double a)
 set the acuity.
double getAcuity ()
 get the acuity value
void setCutoff (double c)
 set the cutoff
double getCutoff ()
 get the cutoff
boolean getSaveInstanceData ()
 Get the value of saveInstances.
void setSaveInstanceData (boolean newsaveInstances)
 Set the value of saveInstances.
Clustering getClusteringResult ()

Public Attributes

FloatOption acuityOption
FloatOption cutoffOption
IntOption randomSeedOption

Static Public Attributes

static final String classifierPurposeString = "Cobweb and Classit clustering algorithms: it always compares the best host, adding a new leaf, merging the two best hosts, and splitting the best host when considering where to place a new instance.."

Protected Member Functions

void determineNumberOfClusters ()
 determines the number of clusters if necessary
Measurement[] getModelMeasurementsImpl ()

Protected Attributes

double m_acuity = 1.0
 Acuity (minimum standard deviation).
double m_cutoff = 0.002
 Cutoff (minimum category utility).
CNode m_cobwebTree = null
 Holds the root of the Cobweb tree.
int m_numberOfClusters = -1
 Number of clusters (nodes in the tree).
boolean m_numberOfClustersDetermined = false
 whether the number of clusters was already determined
int m_numberSplits
 the number of splits that happened
int m_numberMerges
 the number of merges that happened
boolean m_saveInstances = false
 Output instances in graph representation of Cobweb tree (Allows instances at nodes in the tree to be visualized in the Explorer).

Static Protected Attributes

static final double m_normal = 1.0 / (2 * Math.sqrt(Math.PI))
 Normal constant.

Package Functions

 [instance initializer]

Detailed Description

Definition at line 37 of file CobWeb.java.


Member Function Documentation

moa.clusterers.CobWeb.[instance initializer] ( ) [package]
void moa.clusterers.CobWeb.determineNumberOfClusters ( ) [protected]

determines the number of clusters if necessary

See also:
m_numberOfClusters
m_numberOfClustersDetermined

Definition at line 843 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.getVotesForInstance(), and moa.clusterers.CobWeb.numberOfClusters().

Here is the caller graph for this function:

double moa.clusterers.CobWeb.getAcuity ( )

get the acuity value

Returns:
the acuity

Definition at line 928 of file CobWeb.java.

Clustering moa.clusterers.CobWeb.getClusteringResult ( )

Implements moa.clusterers.Clusterer.

Definition at line 968 of file CobWeb.java.

Here is the call graph for this function:

double moa.clusterers.CobWeb.getCutoff ( )

get the cutoff

Returns:
the cutoff

Definition at line 944 of file CobWeb.java.

void moa.clusterers.CobWeb.getModelDescription ( StringBuilder  out,
int  indent 
) [virtual]

Implements moa.clusterers.AbstractClusterer.

Definition at line 881 of file CobWeb.java.

Here is the call graph for this function:

Measurement [] moa.clusterers.CobWeb.getModelMeasurementsImpl ( ) [protected, virtual]

Implements moa.clusterers.AbstractClusterer.

Definition at line 876 of file CobWeb.java.

boolean moa.clusterers.CobWeb.getSaveInstanceData ( )

Get the value of saveInstances.

Returns:
Value of saveInstances.

Definition at line 953 of file CobWeb.java.

double [] moa.clusterers.CobWeb.getVotesForInstance ( Instance  instance)

Classifies a given instance.

Parameters:
instancethe instance to be assigned to a cluster
Returns:
the number of the assigned cluster as an interger if the class is enumerated, otherwise the predicted value
Exceptions:
Exceptionif instance could not be classified successfully

Implements moa.clusterers.Clusterer.

Definition at line 806 of file CobWeb.java.

Here is the call graph for this function:

String moa.clusterers.CobWeb.graph ( )

Generates the graph string of the Cobweb tree.

Returns:
a String value
Exceptions:
Exceptionif an error occurs

Definition at line 907 of file CobWeb.java.

boolean moa.clusterers.CobWeb.isRandomizable ( )

Implements moa.clusterers.Clusterer.

Definition at line 897 of file CobWeb.java.

int moa.clusterers.CobWeb.numberOfClusters ( )

Returns the number of clusters.

Returns:
the number of clusters

Definition at line 866 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.getClusteringResult(), and moa.clusterers.CobWeb.getModelDescription().

Here is the call graph for this function:

Here is the caller graph for this function:

void moa.clusterers.CobWeb.resetLearningImpl ( ) [virtual]

Implements moa.clusterers.AbstractClusterer.

Definition at line 770 of file CobWeb.java.

Here is the call graph for this function:

void moa.clusterers.CobWeb.setAcuity ( double  a)

set the acuity.

Parameters:
athe acuity value

Definition at line 920 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.resetLearningImpl().

Here is the caller graph for this function:

void moa.clusterers.CobWeb.setCutoff ( double  c)

set the cutoff

Parameters:
cthe cutof

Definition at line 936 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.resetLearningImpl().

Here is the caller graph for this function:

void moa.clusterers.CobWeb.setSaveInstanceData ( boolean  newsaveInstances)

Set the value of saveInstances.

Parameters:
newsaveInstancesValue to assign to saveInstances.

Definition at line 963 of file CobWeb.java.

void moa.clusterers.CobWeb.trainOnInstanceImpl ( Instance  newInstance) [virtual]

Adds an instance to the clusterer.

Parameters:
newInstancethe instance to be added
Exceptions:
Exceptionif something goes wrong

Implements moa.clusterers.AbstractClusterer.

Definition at line 787 of file CobWeb.java.


Member Data Documentation

Initial value:
 new FloatOption("acuity",
            'a', "Acuity (minimum standard deviation)", 1.0, 0.0, 90.0)

Definition at line 40 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.resetLearningImpl().

final String moa.clusterers.CobWeb.classifierPurposeString = "Cobweb and Classit clustering algorithms: it always compares the best host, adding a new leaf, merging the two best hosts, and splitting the best host when considering where to place a new instance.." [static]

Definition at line 767 of file CobWeb.java.

Initial value:
 new FloatOption("cutoff",
            'c', "Cutoff (minimum category utility)", 0.002, 0.0, 90.0)

Definition at line 42 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.resetLearningImpl().

double moa.clusterers.CobWeb.m_acuity = 1.0 [protected]

Acuity (minimum standard deviation).

Definition at line 737 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.getAcuity(), and moa.clusterers.CobWeb.setAcuity().

double moa.clusterers.CobWeb.m_cutoff = 0.002 [protected]

Cutoff (minimum category utility).

Definition at line 741 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.getCutoff(), and moa.clusterers.CobWeb.setCutoff().

final double moa.clusterers.CobWeb.m_normal = 1.0 / (2 * Math.sqrt(Math.PI)) [static, protected]

Normal constant.

Definition at line 733 of file CobWeb.java.

the number of merges that happened

Definition at line 760 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.getModelDescription(), and moa.clusterers.CobWeb.resetLearningImpl().

Number of clusters (nodes in the tree).

Must never be queried directly, only via the method numberOfClusters(). Otherwise it's not guaranteed that it contains the correct value.

See also:
numberOfClusters()
m_numberOfClustersDetermined

Definition at line 754 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.determineNumberOfClusters(), moa.clusterers.CobWeb.getVotesForInstance(), moa.clusterers.CobWeb.numberOfClusters(), and moa.clusterers.CobWeb.resetLearningImpl().

whether the number of clusters was already determined

Definition at line 756 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.determineNumberOfClusters(), and moa.clusterers.CobWeb.trainOnInstanceImpl().

the number of splits that happened

Definition at line 758 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.getModelDescription(), and moa.clusterers.CobWeb.resetLearningImpl().

boolean moa.clusterers.CobWeb.m_saveInstances = false [protected]

Output instances in graph representation of Cobweb tree (Allows instances at nodes in the tree to be visualized in the Explorer).

Definition at line 765 of file CobWeb.java.

Referenced by moa.clusterers.CobWeb.getSaveInstanceData(), and moa.clusterers.CobWeb.setSaveInstanceData().

Initial value:
 new IntOption("randomSeed", 'r',
            "Seed for random noise.", 1)

Reimplemented from moa.clusterers.AbstractClusterer.

Definition at line 44 of file CobWeb.java.


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