类 CostSensitiveASEvaluation

java.lang.Object
weka.attributeSelection.ASEvaluation
weka.attributeSelection.CostSensitiveASEvaluation
所有已实现的接口:
Serializable, CapabilitiesHandler, OptionHandler, RevisionHandler
直接已知子类:
CostSensitiveAttributeEval, CostSensitiveSubsetEval

public abstract class CostSensitiveASEvaluation extends ASEvaluation implements OptionHandler, Serializable
Abstract base class for cost-sensitive subset and attribute evaluators.
版本:
$Revision: 5562 $
作者:
Mark Hall (mhall{[at]}pentaho{[dot]}com)
另请参阅:
  • 字段详细资料

    • MATRIX_ON_DEMAND

      public static final int MATRIX_ON_DEMAND
      load cost matrix on demand
      另请参阅:
    • MATRIX_SUPPLIED

      public static final int MATRIX_SUPPLIED
      use explicit cost matrix
      另请参阅:
    • TAGS_MATRIX_SOURCE

      public static final Tag[] TAGS_MATRIX_SOURCE
      Specify possible sources of the cost matrix
  • 构造器详细资料

    • CostSensitiveASEvaluation

      public CostSensitiveASEvaluation()
  • 方法详细资料

    • listOptions

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

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

      Valid options are:

       -C <cost file name>
        File name of a cost matrix to use. If this is not supplied,
        a cost matrix will be loaded on demand. The name of the
        on-demand file is the relation name of the training data
        plus ".cost", and the path to the on-demand file is
        specified with the -N option.
       -N <directory>
        Name of a directory to search for cost files when loading
        costs on demand (default current directory).
       -cost-matrix <matrix>
        The cost matrix in Matlab single line format.
       -S <integer>
        The seed to use for random number generation.
       -W
        Full name of base evaluator.
        (default: weka.attributeSelection.CfsSubsetEval)
      Options after -- are passed to the designated evaluator.

      指定者:
      setOptions 在接口中 OptionHandler
      参数:
      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 subset evaluator.
      指定者:
      getOptions 在接口中 OptionHandler
      返回:
      an array of strings suitable for passing to setOptions
    • globalInfo

      public String globalInfo()
      返回:
      a description of the classifier suitable for displaying in the explorer/experimenter gui
    • defaultEvaluatorString

      public String defaultEvaluatorString()
      Return the name of the default evaluator.
      返回:
      the name of the default evaluator
    • costMatrixSourceTipText

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

      public SelectedTag getCostMatrixSource()
      Gets the source location method of the cost matrix. Will be one of MATRIX_ON_DEMAND or MATRIX_SUPPLIED.
      返回:
      the cost matrix source.
    • setCostMatrixSource

      public void setCostMatrixSource(SelectedTag newMethod)
      Sets the source location of the cost matrix. Values other than MATRIX_ON_DEMAND or MATRIX_SUPPLIED will be ignored.
      参数:
      newMethod - the cost matrix location method.
    • onDemandDirectoryTipText

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

      public File getOnDemandDirectory()
      Returns the directory that will be searched for cost files when loading on demand.
      返回:
      The cost file search directory.
    • setOnDemandDirectory

      public void setOnDemandDirectory(File newDir)
      Sets the directory that will be searched for cost files when loading on demand.
      参数:
      newDir - The cost file search directory.
    • costMatrixTipText

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

      public CostMatrix getCostMatrix()
      Gets the misclassification cost matrix.
      返回:
      the cost matrix
    • setCostMatrix

      public void setCostMatrix(CostMatrix newCostMatrix)
      Sets the misclassification cost matrix.
      参数:
      newCostMatrix - the cost matrix
    • seedTipText

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

      public void setSeed(int seed)
      Set the seed for random number generation.
      参数:
      seed - the seed
    • getSeed

      public int getSeed()
      Gets the seed for the random number generations.
      返回:
      the seed for the random number generation
    • evaluatorTipText

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

      public void setEvaluator(ASEvaluation newEvaluator) throws IllegalArgumentException
      Set the base evaluator.
      参数:
      newEvaluator - the evaluator to use.
      抛出:
      IllegalArgumentException - if the evaluator is of the wrong type
    • getEvaluator

      public ASEvaluation getEvaluator()
      Get the evaluator used as the base evaluator.
      返回:
      the evaluator used as the base evaluator
    • getCapabilities

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

      public void buildEvaluator(Instances data) throws Exception
      Generates a attribute evaluator. Has to initialize all fields of the evaluator that are not being set via options.
      指定者:
      buildEvaluator 在类中 ASEvaluation
      参数:
      data - set of instances serving as training data
      抛出:
      Exception - if the evaluator has not been generated successfully
    • postProcess

      public int[] postProcess(int[] attributeSet) throws Exception
      Provides a chance for a attribute evaluator to do any special post processing of the selected attribute set.
      覆盖:
      postProcess 在类中 ASEvaluation
      参数:
      attributeSet - the set of attributes found by the search
      返回:
      a possibly ranked list of postprocessed attributes
      抛出:
      Exception - if postprocessing fails for some reason
    • toString

      public String toString()
      Output a representation of this evaluator
      覆盖:
      toString 在类中 Object
      返回:
      a string representation of the classifier
    • getRevision

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