|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.clusterers.Clusterer
weka.clusterers.RandomizableClusterer
weka.clusterers.Cobweb
public class Cobweb
Class implementing the Cobweb and Classit clustering algorithms.
Note: the application of node operators (merging, splitting etc.) in terms of ordering and priority differs (and is somewhat ambiguous) between the original Cobweb and Classit papers. This algorithm 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.
For more information see:
D. Fisher (1987). Knowledge acquisition via incremental conceptual clustering. Machine Learning. 2(2):139-172.
J. H. Gennari, P. Langley, D. Fisher (1990). Models of incremental concept formation. Artificial Intelligence. 40:11-61.
@article{Fisher1987, author = {D. Fisher}, journal = {Machine Learning}, number = {2}, pages = {139-172}, title = {Knowledge acquisition via incremental conceptual clustering}, volume = {2}, year = {1987} } @article{Gennari1990, author = {J. H. Gennari and P. Langley and D. Fisher}, journal = {Artificial Intelligence}, pages = {11-61}, title = {Models of incremental concept formation}, volume = {40}, year = {1990} }Valid options are:
-A <acuity> Acuity. (default=1.0)
-C <cutoff> Cutoff. (default=0.002)
-S <num> Random number seed. (default 42)
RandomizableClusterer
,
Drawable
,
Serialized FormField Summary |
---|
Fields inherited from interface weka.core.Drawable |
---|
BayesNet, NOT_DRAWABLE, TREE |
Constructor Summary | |
---|---|
Cobweb()
default constructor |
Method Summary | |
---|---|
java.lang.String |
acuityTipText()
Returns the tip text for this property |
void |
addInstance(Instance newInstance)
Deprecated. updateClusterer(Instance) should be used instead |
void |
buildClusterer(Instances data)
Builds the clusterer. |
int |
clusterInstance(Instance instance)
Classifies a given instance. |
java.lang.String |
cutoffTipText()
Returns the tip text for this property |
double |
getAcuity()
get the acuity value |
Capabilities |
getCapabilities()
Returns default capabilities of the clusterer. |
double |
getCutoff()
get the cutoff |
java.lang.String[] |
getOptions()
Gets the current settings of Cobweb. |
boolean |
getSaveInstanceData()
Get the value of saveInstances. |
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
java.lang.String |
globalInfo()
Returns a string describing this clusterer |
java.lang.String |
graph()
Generates the graph string of the Cobweb tree |
int |
graphType()
Returns the type of graphs this class represents |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Main method |
int |
numberOfClusters()
Returns the number of clusters. |
java.lang.String |
saveInstanceDataTipText()
Returns the tip text for this property |
void |
setAcuity(double a)
set the acuity. |
void |
setCutoff(double c)
set the cutoff |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setSaveInstanceData(boolean newsaveInstances)
Set the value of saveInstances. |
java.lang.String |
toString()
Returns a description of the clusterer as a string. |
void |
updateClusterer(Instance newInstance)
Adds an instance to the clusterer. |
void |
updateFinished()
Singals the end of the updating. |
Methods inherited from class weka.clusterers.RandomizableClusterer |
---|
getSeed, seedTipText, setSeed |
Methods inherited from class weka.clusterers.Clusterer |
---|
distributionForInstance, forName, makeCopies, makeCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Cobweb()
Method Detail |
---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Clusterer
Capabilities
public void buildClusterer(Instances data) throws java.lang.Exception
buildClusterer
in class Clusterer
data
- the training instances.
java.lang.Exception
- if something goes wrong.public void updateFinished()
updateFinished
in interface UpdateableClusterer
public int clusterInstance(Instance instance) throws java.lang.Exception
clusterInstance
in class Clusterer
instance
- the instance to be assigned to a cluster
java.lang.Exception
- if instance could not be classified
successfullypublic int numberOfClusters()
numberOfClusters
in class Clusterer
public void updateClusterer(Instance newInstance) throws java.lang.Exception
updateClusterer
in interface UpdateableClusterer
newInstance
- the instance to be added
java.lang.Exception
- if something goes wrongpublic void addInstance(Instance newInstance) throws java.lang.Exception
newInstance
- the instance to be added
java.lang.Exception
- if something goes wrongupdateClusterer(Instance)
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class RandomizableClusterer
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-A <acuity> Acuity. (default=1.0)
-C <cutoff> Cutoff. (default=0.002)
-S <num> Random number seed. (default 42)
setOptions
in interface OptionHandler
setOptions
in class RandomizableClusterer
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String acuityTipText()
public void setAcuity(double a)
a
- the acuity valuepublic double getAcuity()
public java.lang.String cutoffTipText()
public void setCutoff(double c)
c
- the cutofpublic double getCutoff()
public java.lang.String saveInstanceDataTipText()
public boolean getSaveInstanceData()
public void setSaveInstanceData(boolean newsaveInstances)
newsaveInstances
- Value to assign to saveInstances.public java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class RandomizableClusterer
public java.lang.String toString()
toString
in class java.lang.Object
public int graphType()
graphType
in interface Drawable
public java.lang.String graph() throws java.lang.Exception
graph
in interface Drawable
String
value
java.lang.Exception
- if an error occurspublic static void main(java.lang.String[] argv)
argv
- the commandline options
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |