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)
-S <num> Random number seed. (default 42)
RandomizableClusterer
,
Drawable
,
Serialized FormBayesNet, 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.
|
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
|
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
distributionForInstance, forName, makeCopies, 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 void updateClusterer(Instance newInstance) throws java.lang.Exception
updateClusterer
in interface UpdateableClusterer
newInstance
- the instance to be addedjava.lang.Exception
- if something goes wrongpublic 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 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 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