程序包 weka.clusterers

类 FilteredClusterer

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

public class FilteredClusterer extends SingleClustererEnhancer
Class for running an arbitrary clusterer on data that has been passed through an arbitrary filter. Like the clusterer, the structure of the filter is based exclusively on the training data and test instances will be processed by the filter without changing their structure.

Valid options are:

 -F <filter specification>
  Full class name of filter to use, followed
  by filter options.
  eg: "weka.filters.unsupervised.attribute.Remove -V -R 1,2"
 (default: weka.filters.AllFilter)
 -W
  Full name of base clusterer.
  (default: weka.clusterers.SimpleKMeans)
 
 Options specific to clusterer weka.clusterers.SimpleKMeans:
 
 -N <num>
  number of clusters.
  (default 2).
 -V
  Display std. deviations for centroids.
 
 -M
  Replace missing values with mean/mode.
 
 -S <num>
  Random number seed.
  (default 10)
Based on code from the FilteredClassifier by Len Trigg.
版本:
$Revision: 5538 $
作者:
Len Trigg (trigg@cs.waikato.ac.nz), FracPete (fracpete at waikato dot ac dot nz)
另请参阅:
  • 构造器详细资料

    • FilteredClusterer

      public FilteredClusterer()
      Default constructor.
  • 方法详细资料

    • globalInfo

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

      public Enumeration listOptions()
      Returns an enumeration describing the available options.
      指定者:
      listOptions 在接口中 OptionHandler
      覆盖:
      listOptions 在类中 SingleClustererEnhancer
      返回:
      an enumeration of all the available options.
    • setOptions

      public void setOptions(String[] options) throws Exception
      Parses a given list of options.

      Valid options are:

       -F <filter specification>
        Full class name of filter to use, followed
        by filter options.
        eg: "weka.filters.unsupervised.attribute.Remove -V -R 1,2"
       (default: weka.filters.AllFilter)
       -W
        Full name of base clusterer.
        (default: weka.clusterers.SimpleKMeans)
       
       Options specific to clusterer weka.clusterers.SimpleKMeans:
       
       -N <num>
        number of clusters.
        (default 2).
       -V
        Display std. deviations for centroids.
       
       -M
        Replace missing values with mean/mode.
       
       -S <num>
        Random number seed.
        (default 10)
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 SingleClustererEnhancer
      参数:
      options - the list of options as an array of strings
      抛出:
      Exception - if an option is not supported
    • getOptions

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

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

      public void setFilter(Filter filter)
      Sets the filter.
      参数:
      filter - the filter with all options set.
    • getFilter

      public Filter getFilter()
      Gets the filter used.
      返回:
      the filter
    • getCapabilities

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

      public void buildClusterer(Instances data) throws Exception
      Build the clusterer on the filtered data.
      指定者:
      buildClusterer 在接口中 Clusterer
      指定者:
      buildClusterer 在类中 AbstractClusterer
      参数:
      data - the training data
      抛出:
      Exception - if the clusterer could not be built successfully
    • distributionForInstance

      public double[] distributionForInstance(Instance instance) throws Exception
      Classifies a given instance after filtering.
      指定者:
      distributionForInstance 在接口中 Clusterer
      覆盖:
      distributionForInstance 在类中 AbstractClusterer
      参数:
      instance - the instance to be classified
      返回:
      the class distribution for the given instance
      抛出:
      Exception - if instance could not be classified successfully
    • toString

      public String toString()
      Output a representation of this clusterer.
      覆盖:
      toString 在类中 Object
      返回:
      a representation of this clusterer
    • getRevision

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

      public static void main(String[] args)
      Main method for testing this class.
      参数:
      args - the commandline options, use "-h" for help