public class Cobweb extends RandomizableClusterer implements Drawable, TechnicalInformationHandler, UpdateableClusterer
@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)
-save-data Save instance data.
-S <num> Random number seed. (default 42)
-output-debug-info If set, clusterer is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, clusterer capabilities are not checked before clusterer is built (use with caution).
RandomizableClusterer
,
Drawable
,
Serialized FormModifier and Type | Class and Description |
---|---|
class |
Cobweb.CNode
Inner class handling node operations for Cobweb.
|
BayesNet, Newick, NOT_DRAWABLE, TREE
Constructor and Description |
---|
Cobweb()
default constructor
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.String |
getRevision()
Returns the revision string.
|
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.
|
Cobweb.CNode |
getTreeRoot()
Get the root of the tree.
|
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<Option> |
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
|
java.lang.String |
seedTipText()
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.
|
getSeed, setSeed
debugTipText, distributionForInstance, doNotCheckCapabilitiesTipText, forName, getDebug, getDoNotCheckCapabilities, makeCopies, makeCopy, postExecution, preExecution, run, runClusterer, setDebug, setDoNotCheckCapabilities
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
makeCopy
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Capabilities getCapabilities()
getCapabilities
in interface Clusterer
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class AbstractClusterer
Capabilities
public void buildClusterer(Instances data) throws java.lang.Exception
buildClusterer
in interface Clusterer
buildClusterer
in class AbstractClusterer
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 interface Clusterer
clusterInstance
in class AbstractClusterer
instance
- the instance to be assigned to a clusterjava.lang.Exception
- if instance could not be classified successfullypublic int numberOfClusters()
numberOfClusters
in interface Clusterer
numberOfClusters
in class AbstractClusterer
public Cobweb.CNode getTreeRoot()
public void updateClusterer(Instance newInstance) throws java.lang.Exception
updateClusterer
in interface UpdateableClusterer
newInstance
- the instance to be addedjava.lang.Exception
- if something goes wrong@Deprecated public void addInstance(Instance newInstance) throws java.lang.Exception
newInstance
- the instance to be addedjava.lang.Exception
- if something goes wrongupdateClusterer(Instance)
public java.util.Enumeration<Option> 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)
-save-data Save instance data.
-S <num> Random number seed. (default 42)
-output-debug-info If set, clusterer is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, clusterer capabilities are not checked before clusterer is built (use with caution).
setOptions
in interface OptionHandler
setOptions
in class RandomizableClusterer
options
- the list of options as an array of stringsjava.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()
public java.lang.String graph() throws java.lang.Exception
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractClusterer
public java.lang.String seedTipText()
seedTipText
in class RandomizableClusterer
public static void main(java.lang.String[] argv)
argv
- the commandline options