类 Vote

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

Class for combining classifiers. Different combinations of probability estimates for classification are available.

For more information see:

Ludmila I. Kuncheva (2004). Combining Pattern Classifiers: Methods and Algorithms. John Wiley and Sons, Inc..

J. Kittler, M. Hatef, Robert P.W. Duin, J. Matas (1998). On combining classifiers. IEEE Transactions on Pattern Analysis and Machine Intelligence. 20(3):226-239.

Valid options are:

 -S <num>
  Random number seed.
  (default 1)
 
 -B <classifier specification>
  Full class name of classifier to include, followed
  by scheme options. May be specified multiple times.
  (default: "weka.classifiers.rules.ZeroR")
 
 -D
  If set, classifier is run in debug mode and
  may output additional info to the console
 
 -R <AVG|PROD|MAJ|MIN|MAX|MED>
  The combination rule to use
  (default: AVG)
 
BibTeX:
 @book{Kuncheva2004,
    author = {Ludmila I. Kuncheva},
    publisher = {John Wiley and Sons, Inc.},
    title = {Combining Pattern Classifiers: Methods and Algorithms},
    year = {2004}
 }
 
 @article{Kittler1998,
    author = {J. Kittler and M. Hatef and Robert P.W. Duin and J. Matas},
    journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
    number = {3},
    pages = {226-239},
    title = {On combining classifiers},
    volume = {20},
    year = {1998}
 }
 

版本:
$Revision: 12426 $
作者:
Alexander K. Seewald (alex@seewald.at), Eibe Frank (eibe@cs.waikato.ac.nz), Roberto Perdisci (roberto.perdisci@gmail.com)
另请参阅:
  • 字段详细资料

    • AVERAGE_RULE

      public static final int AVERAGE_RULE
      combination rule: Average of Probabilities
      另请参阅:
    • PRODUCT_RULE

      public static final int PRODUCT_RULE
      combination rule: Product of Probabilities (only nominal classes)
      另请参阅:
    • MAJORITY_VOTING_RULE

      public static final int MAJORITY_VOTING_RULE
      combination rule: Majority Voting (only nominal classes)
      另请参阅:
    • MIN_RULE

      public static final int MIN_RULE
      combination rule: Minimum Probability
      另请参阅:
    • MAX_RULE

      public static final int MAX_RULE
      combination rule: Maximum Probability
      另请参阅:
    • MEDIAN_RULE

      public static final int MEDIAN_RULE
      combination rule: Median Probability (only numeric class)
      另请参阅:
    • TAGS_RULES

      public static final Tag[] TAGS_RULES
      combination rules
  • 构造器详细资料

    • Vote

      public Vote()
  • 方法详细资料

    • globalInfo

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

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

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

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

      Valid options are:

       -S <num>
        Random number seed.
        (default 1)
       
       -B <classifier specification>
        Full class name of classifier to include, followed
        by scheme options. May be specified multiple times.
        (default: "weka.classifiers.rules.ZeroR")
       
       -D
        If set, classifier is run in debug mode and
        may output additional info to the console
       
       -R <AVG|PROD|MAJ|MIN|MAX|MED>
        The combination rule to use
        (default: AVG)
       
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 RandomizableMultipleClassifiersCombiner
      参数:
      options - the list of options as an array of strings
      抛出:
      Exception - if an option is not supported
    • 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 classifier.
      指定者:
      getCapabilities 在接口中 CapabilitiesHandler
      覆盖:
      getCapabilities 在类中 MultipleClassifiersCombiner
      返回:
      the capabilities of this classifier
      另请参阅:
    • buildClassifier

      public void buildClassifier(Instances data) throws Exception
      Buildclassifier selects a classifier from the set of classifiers by minimising error on the training data.
      指定者:
      buildClassifier 在类中 Classifier
      参数:
      data - the training data to be used for generating the boosted classifier.
      抛出:
      Exception - if the classifier could not be built successfully
    • classifyInstance

      public double classifyInstance(Instance instance) throws Exception
      Classifies the given test instance.
      覆盖:
      classifyInstance 在类中 Classifier
      参数:
      instance - the instance to be classified
      返回:
      the predicted most likely class for the instance or Instance.missingValue() if no prediction is made
      抛出:
      Exception - if an error occurred during the prediction
    • distributionForInstance

      public double[] distributionForInstance(Instance instance) throws Exception
      Classifies a given instance using the selected combination rule.
      覆盖:
      distributionForInstance 在类中 Classifier
      参数:
      instance - the instance to be classified
      返回:
      the distribution
      抛出:
      Exception - if instance could not be classified successfully
    • combinationRuleTipText

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

      public SelectedTag getCombinationRule()
      Gets the combination rule used
      返回:
      the combination rule used
    • setCombinationRule

      public void setCombinationRule(SelectedTag newRule)
      Sets the combination rule to use. Values other than
      参数:
      newRule - the combination rule method to use
    • toString

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

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

      public static void main(String[] argv)
      Main method for testing this class.
      参数:
      argv - should contain the following arguments: -t training file [-T test file] [-c class index]