程序包 weka.clusterers

类 Cobweb

所有已实现的接口:
Serializable, Cloneable, Clusterer, UpdateableClusterer, CapabilitiesHandler, Drawable, OptionHandler, Randomizable, RevisionHandler, TechnicalInformationHandler

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.

BibTeX:

 @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)
版本:
$Revision: 6790 $
作者:
Mark Hall
另请参阅:
  • 构造器详细资料

    • Cobweb

      public Cobweb()
      default constructor
  • 方法详细资料

    • globalInfo

      public String globalInfo()
      Returns a string describing this clusterer
      返回:
      a description of the evaluator suitable for displaying in the explorer/experimenter gui
    • getTechnicalInformation

      public 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.
      指定者:
      getTechnicalInformation 在接口中 TechnicalInformationHandler
      返回:
      the technical information about this class
    • getCapabilities

      public Capabilities getCapabilities()
      Returns default capabilities of the clusterer.
      指定者:
      getCapabilities 在接口中 CapabilitiesHandler
      指定者:
      getCapabilities 在接口中 Clusterer
      覆盖:
      getCapabilities 在类中 AbstractClusterer
      返回:
      the capabilities of this clusterer
      另请参阅:
    • buildClusterer

      public void buildClusterer(Instances data) throws Exception
      Builds the clusterer.
      指定者:
      buildClusterer 在接口中 Clusterer
      指定者:
      buildClusterer 在类中 AbstractClusterer
      参数:
      data - the training instances.
      抛出:
      Exception - if something goes wrong.
    • updateFinished

      public void updateFinished()
      Singals the end of the updating.
      指定者:
      updateFinished 在接口中 UpdateableClusterer
    • clusterInstance

      public int clusterInstance(Instance instance) throws Exception
      Classifies a given instance.
      指定者:
      clusterInstance 在接口中 Clusterer
      覆盖:
      clusterInstance 在类中 AbstractClusterer
      参数:
      instance - the instance to be assigned to a cluster
      返回:
      the number of the assigned cluster as an interger if the class is enumerated, otherwise the predicted value
      抛出:
      Exception - if instance could not be classified successfully
    • numberOfClusters

      public int numberOfClusters()
      Returns the number of clusters.
      指定者:
      numberOfClusters 在接口中 Clusterer
      指定者:
      numberOfClusters 在类中 AbstractClusterer
      返回:
      the number of clusters
    • updateClusterer

      public void updateClusterer(Instance newInstance) throws Exception
      Adds an instance to the clusterer.
      指定者:
      updateClusterer 在接口中 UpdateableClusterer
      参数:
      newInstance - the instance to be added
      抛出:
      Exception - if something goes wrong
    • addInstance

      public void addInstance(Instance newInstance) throws Exception
      已过时。
      updateClusterer(Instance) should be used instead
      Adds an instance to the Cobweb tree.
      参数:
      newInstance - the instance to be added
      抛出:
      Exception - if something goes wrong
      另请参阅:
    • listOptions

      public Enumeration listOptions()
      Returns an enumeration describing the available options.
      指定者:
      listOptions 在接口中 OptionHandler
      覆盖:
      listOptions 在类中 RandomizableClusterer
      返回:
      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 <acuity>
        Acuity.
        (default=1.0)
       -C <cutoff>
        Cutoff.
        (default=0.002)
       -S <num>
        Random number seed.
        (default 42)
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 RandomizableClusterer
      参数:
      options - the list of options as an array of strings
      抛出:
      Exception - if an option is not supported
    • acuityTipText

      public String acuityTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setAcuity

      public void setAcuity(double a)
      set the acuity.
      参数:
      a - the acuity value
    • getAcuity

      public double getAcuity()
      get the acuity value
      返回:
      the acuity
    • cutoffTipText

      public String cutoffTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setCutoff

      public void setCutoff(double c)
      set the cutoff
      参数:
      c - the cutof
    • getCutoff

      public double getCutoff()
      get the cutoff
      返回:
      the cutoff
    • saveInstanceDataTipText

      public String saveInstanceDataTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • getSaveInstanceData

      public boolean getSaveInstanceData()
      Get the value of saveInstances.
      返回:
      Value of saveInstances.
    • setSaveInstanceData

      public void setSaveInstanceData(boolean newsaveInstances)
      Set the value of saveInstances.
      参数:
      newsaveInstances - Value to assign to saveInstances.
    • getOptions

      public String[] getOptions()
      Gets the current settings of Cobweb.
      指定者:
      getOptions 在接口中 OptionHandler
      覆盖:
      getOptions 在类中 RandomizableClusterer
      返回:
      an array of strings suitable for passing to setOptions()
    • toString

      public String toString()
      Returns a description of the clusterer as a string.
      覆盖:
      toString 在类中 Object
      返回:
      a string describing the clusterer.
    • graphType

      public int graphType()
      Returns the type of graphs this class represents
      指定者:
      graphType 在接口中 Drawable
      返回:
      Drawable.TREE
    • graph

      public String graph() throws Exception
      Generates the graph string of the Cobweb tree
      指定者:
      graph 在接口中 Drawable
      返回:
      a String value
      抛出:
      Exception - if an error occurs
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      覆盖:
      getRevision 在类中 AbstractClusterer
      返回:
      the revision
    • seedTipText

      public String seedTipText()
      Returns the tip text for this property
      覆盖:
      seedTipText 在类中 RandomizableClusterer
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • main

      public static void main(String[] argv)
      Main method.
      参数:
      argv - the commandline options