程序包 weka.core

类 CheckScheme

java.lang.Object
weka.core.Check
weka.core.CheckScheme
所有已实现的接口:
OptionHandler, RevisionHandler
直接已知子类:
CheckAssociator, CheckAttributeSelection, CheckClassifier, CheckClusterer, CheckKernel

public abstract class CheckScheme extends Check
Abstract general class for testing schemes in Weka. Derived classes are also used for JUnit tests.
版本:
$Revision: 1.4 $
作者:
FracPete (fracpete at waikato dot ac dot nz)
另请参阅:
  • 构造器详细资料

    • CheckScheme

      public CheckScheme()
  • 方法详细资料

    • listOptions

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

      public void setOptions(String[] options) throws Exception
      Parses a given list of options.
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 Check
      参数:
      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 CheckClassifier.
      指定者:
      getOptions 在接口中 OptionHandler
      覆盖:
      getOptions 在类中 Check
      返回:
      an array of strings suitable for passing to setOptions
    • setPostProcessor

      public void setPostProcessor(CheckScheme.PostProcessor value)
      sets the PostProcessor to use
      参数:
      value - the new PostProcessor
      另请参阅:
      • m_PostProcessor
    • getPostProcessor

      public CheckScheme.PostProcessor getPostProcessor()
      returns the current PostProcessor, can be null
      返回:
      the current PostProcessor
    • hasClasspathProblems

      public boolean hasClasspathProblems()
      returns TRUE if the classifier returned a "not in classpath" Exception
      返回:
      true if CLASSPATH problems occurred
    • doTests

      public abstract void doTests()
      Begin the tests, reporting results to System.out
      指定者:
      doTests 在类中 Check
    • setNumInstances

      public void setNumInstances(int value)
      Sets the number of instances to use in the datasets (some classifiers might require more instances).
      参数:
      value - the number of instances to use
    • getNumInstances

      public int getNumInstances()
      Gets the current number of instances to use for the datasets.
      返回:
      the number of instances
    • setNumNominal

      public void setNumNominal(int value)
      sets the number of nominal attributes
      参数:
      value - the number of nominal attributes
    • getNumNominal

      public int getNumNominal()
      returns the current number of nominal attributes
      返回:
      the number of nominal attributes
    • setNumNumeric

      public void setNumNumeric(int value)
      sets the number of numeric attributes
      参数:
      value - the number of numeric attributes
    • getNumNumeric

      public int getNumNumeric()
      returns the current number of numeric attributes
      返回:
      the number of numeric attributes
    • setNumString

      public void setNumString(int value)
      sets the number of string attributes
      参数:
      value - the number of string attributes
    • getNumString

      public int getNumString()
      returns the current number of string attributes
      返回:
      the number of string attributes
    • setNumDate

      public void setNumDate(int value)
      sets the number of data attributes
      参数:
      value - the number of date attributes
    • getNumDate

      public int getNumDate()
      returns the current number of date attributes
      返回:
      the number of date attributes
    • setNumRelational

      public void setNumRelational(int value)
      sets the number of relational attributes
      参数:
      value - the number of relational attributes
    • getNumRelational

      public int getNumRelational()
      returns the current number of relational attributes
      返回:
      the number of relational attributes
    • setNumInstancesRelational

      public void setNumInstancesRelational(int value)
      sets the number of instances in relational/bag attributes to produce
      参数:
      value - the number of instances
    • getNumInstancesRelational

      public int getNumInstancesRelational()
      returns the current number of instances in relational/bag attributes to produce
      返回:
      the number of instances
    • attributeTypeToString

      public static String attributeTypeToString(int type)
      returns a string representation of the attribute type
      参数:
      type - the attribute type to get a string rerpresentation for
      返回:
      the string representation
    • setWords

      public void setWords(String value)
      Sets the comma-separated list of words to use for generating strings. The list must contain at least 2 words, otherwise an exception will be thrown.
      参数:
      value - the list of words
      抛出:
      IllegalArgumentException - if not at least 2 words are provided
    • getWords

      public String getWords()
      returns the words used for assembling strings in a comma-separated list.
      返回:
      the words as comma-separated list
    • setWordSeparators

      public void setWordSeparators(String value)
      sets the word separators (chars) to use for assembling strings.
      参数:
      value - the characters to use as separators
    • getWordSeparators

      public String getWordSeparators()
      returns the word separators (chars) to use for assembling strings.
      返回:
      the current separators