All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.clusterers.Cobweb

java.lang.Object
   |
   +----weka.clusterers.Clusterer
           |
           +----weka.clusterers.Cobweb

public class Cobweb
extends Clusterer
implements OptionHandler

Constructor Index

 o Cobweb()

Method Index

 o add(Cobweb. CTree, Cobweb. CTree)
Adds an example to the tree.
 o bestHost(Cobweb. CTree, Cobweb. CTree, double, double)
Finds the best place to add a new node during training.
 o bestHostCluster(Cobweb. CTree, Cobweb. CTree, double, double)
Finds the cluster that an unseen instance belongs to.
 o buildClusterer(Instances)
Builds the clusterer.
 o clusterInstance(Instance)
Clusters an instance.
 o getAcuity()
get the accuity value
 o getCutoff()
get the cutoff
 o getOptions()
Gets the current settings of Cobweb.
 o listOptions()
Returns an enumeration describing the available options
 o main(String[])
 o numberOfClusters()
Returns the number of clusters.
 o setAcuity(int)
set the accuity.
 o setCutoff(int)
set the cutoff
 o setOptions(String[])
Parses a given list of options.
 o toString()
Returns a description of the clusterer as a string.

Constructors

 o Cobweb
 public Cobweb()

Methods

 o buildClusterer
 public void buildClusterer(Instances data) throws Exception
Builds the clusterer.

Parameters:
data - the training instances.
Throws: Exception
if something goes wrong.
Overrides:
buildClusterer in class Clusterer
 o numberOfClusters
 public int numberOfClusters() throws Exception
Returns the number of clusters.

Throws: Exception
if something goes wrong.
Overrides:
numberOfClusters in class Clusterer
 o clusterInstance
 public int clusterInstance(Instance instance) throws Exception
Clusters an instance.

Parameters:
instance - the instance to cluster.
Throws: Exception
if something goes wrong.
Overrides:
clusterInstance in class Clusterer
 o add
 public void add(Cobweb. CTree node,
                 Cobweb. CTree tree) throws Exception
Adds an example to the tree.

Parameters:
node - the node to be added.
tree - the tree.
Throws: Exception
if something goes wrong.
 o bestHostCluster
 public Cobweb. CTree bestHostCluster(Cobweb. CTree tree,
                                      Cobweb. CTree node,
                                      double aU,
                                      double baseU) throws Exception
Finds the cluster that an unseen instance belongs to.

Parameters:
tree - the tree.
node - the node to be added.
aU - ??
baseU - ??
Throws: Exception
if something goes wrong.
 o bestHost
 public Cobweb. CTree bestHost(Cobweb. CTree tree,
                               Cobweb. CTree node,
                               double aU,
                               double baseU) throws Exception
Finds the best place to add a new node during training.

Parameters:
tree - the tree.
node - the node to be added.
aU - ??
baseU - ??
Throws: Exception
if something goes wrong.
 o toString
 public String toString()
Returns a description of the clusterer as a string.

Returns:
a string describing the clusterer.
Overrides:
toString in class Object
 o listOptions
 public Enumeration listOptions()
Returns an enumeration describing the available options

Returns:
an enumeration of all the available options
 o setOptions
 public void setOptions(String options[]) throws Exception
Parses a given list of options. Valid options are:

-A <0-100>
Acuity.

-C <0-100>
Cutoff.

Parameters:
options - the list of options as an array of strings
Throws: Exception
if an option is not supported
 o setAcuity
 public void setAcuity(int a)
set the accuity.

Parameters:
a - the accuity between 0 and 100
 o getAcuity
 public int getAcuity()
get the accuity value

Returns:
the accuity as a value between 0 and 100
 o setCutoff
 public void setCutoff(int c)
set the cutoff

Parameters:
c - the cutoff between 0 and 100
 o getCutoff
 public int getCutoff()
get the cutoff

Returns:
the cutoff as a value between 1 and 100\
 o getOptions
 public String[] getOptions()
Gets the current settings of Cobweb.

Returns:
an array of strings suitable for passing to setOptions()
 o main
 public static void main(String argv[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home