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
-
Cobweb()
-
-
add(Cobweb. CTree, Cobweb. CTree)
- Adds an example to the tree.
-
bestHost(Cobweb. CTree, Cobweb. CTree, double, double)
- Finds the best place to add a new node during training.
-
bestHostCluster(Cobweb. CTree, Cobweb. CTree, double, double)
- Finds the cluster that an unseen instance belongs to.
-
buildClusterer(Instances)
- Builds the clusterer.
-
clusterInstance(Instance)
- Clusters an instance.
-
getAcuity()
- get the accuity value
-
getCutoff()
- get the cutoff
-
getOptions()
- Gets the current settings of Cobweb.
-
listOptions()
- Returns an enumeration describing the available options
-
main(String[])
-
-
numberOfClusters()
- Returns the number of clusters.
-
setAcuity(int)
- set the accuity.
-
setCutoff(int)
- set the cutoff
-
setOptions(String[])
- Parses a given list of options.
-
toString()
- Returns a description of the clusterer as a string.
Cobweb
public Cobweb()
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
numberOfClusters
public int numberOfClusters() throws Exception
- Returns the number of clusters.
- Throws: Exception
- if something goes wrong.
- Overrides:
- numberOfClusters in class Clusterer
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
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.
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.
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.
toString
public String toString()
- Returns a description of the clusterer as a string.
- Returns:
- a string describing the clusterer.
- Overrides:
- toString in class Object
listOptions
public Enumeration listOptions()
- Returns an enumeration describing the available options
- Returns:
- an enumeration of all the available options
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
setAcuity
public void setAcuity(int a)
- set the accuity.
- Parameters:
- a - the accuity between 0 and 100
getAcuity
public int getAcuity()
- get the accuity value
- Returns:
- the accuity as a value between 0 and 100
setCutoff
public void setCutoff(int c)
- set the cutoff
- Parameters:
- c - the cutoff between 0 and 100
getCutoff
public int getCutoff()
- get the cutoff
- Returns:
- the cutoff as a value between 1 and 100\
getOptions
public String[] getOptions()
- Gets the current settings of Cobweb.
- Returns:
- an array of strings suitable for passing to setOptions()
main
public static void main(String argv[])
All Packages Class Hierarchy This Package Previous Next Index WEKA's home