类 ClusterGenerator

java.lang.Object
weka.datagenerators.DataGenerator
weka.datagenerators.ClusterGenerator
所有已实现的接口:
Serializable, OptionHandler, Randomizable, RevisionHandler
直接已知子类:
BIRCHCluster, SubspaceCluster

public abstract class ClusterGenerator extends DataGenerator
Abstract class for cluster data generators.

Example usage as the main of a datagenerator called RandomGenerator:

 public static void main(String[] args) {
   try {
     DataGenerator.makeData(new RandomGenerator(), args);
   } 
   catch (Exception e) {
     e.printStackTrace();
     System.err.println(e.getMessage());
   }
 }
 

版本:
$Revision: 1.6 $
作者:
Gabi Schmidberger (gabi@cs.waikato.ac.nz), FracPete (fracpete at waikato dot ac dot nz)
另请参阅:
  • 构造器详细资料

    • ClusterGenerator

      public ClusterGenerator()
      initializes the generator
  • 方法详细资料

    • listOptions

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

      public void setOptions(String[] options) throws Exception
      Sets the options.
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 DataGenerator
      参数:
      options - the options
      抛出:
      Exception - if invalid option
    • getOptions

      public String[] getOptions()
      Gets the current settings of the classifier.
      指定者:
      getOptions 在接口中 OptionHandler
      覆盖:
      getOptions 在类中 DataGenerator
      返回:
      an array of strings suitable for passing to setOptions
      另请参阅:
      • DataGenerator.removeBlacklist(String[])
    • setNumAttributes

      public void setNumAttributes(int numAttributes)
      Sets the number of attributes the dataset should have.
      参数:
      numAttributes - the new number of attributes
    • getNumAttributes

      public int getNumAttributes()
      Gets the number of attributes that should be produced.
      返回:
      the number of attributes that should be produced
    • numAttributesTipText

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

      public void setClassFlag(boolean classFlag)
      Sets the class flag, if class flag is set, the cluster is listed as class atrribute in an extra attribute.
      参数:
      classFlag - the new class flag
    • getClassFlag

      public boolean getClassFlag()
      Gets the class flag.
      返回:
      the class flag
    • classFlagTipText

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

      public void setBooleanIndices(String rangeList)
      Sets which attributes are boolean
      参数:
      rangeList - a string representing the list of attributes. Since the string will typically come from a user, attributes are indexed from 1.
      eg: first-3,5,6-last
      抛出:
      IllegalArgumentException - if an invalid range list is supplied
    • setBooleanCols

      public void setBooleanCols(Range value)
      Sets which attributes are boolean.
      参数:
      value - the range to use
    • getBooleanCols

      public Range getBooleanCols()
      returns the range of boolean attributes.
      返回:
      the range of boolean attributes
    • booleanColsTipText

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

      public void setNominalIndices(String rangeList)
      Sets which attributes are nominal
      参数:
      rangeList - a string representing the list of attributes. Since the string will typically come from a user, attributes are indexed from 1.
      eg: first-3,5,6-last
      抛出:
      IllegalArgumentException - if an invalid range list is supplied
    • setNominalCols

      public void setNominalCols(Range value)
      Sets which attributes are nominal.
      参数:
      value - the range to use
    • getNominalCols

      public Range getNominalCols()
      returns the range of nominal attributes
      返回:
      the range of nominal attributes
    • nominalColsTipText

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