类 PART

java.lang.Object
weka.classifiers.Classifier
weka.classifiers.rules.PART
所有已实现的接口:
Serializable, Cloneable, AdditionalMeasureProducer, CapabilitiesHandler, OptionHandler, RevisionHandler, Summarizable, TechnicalInformationHandler, WeightedInstancesHandler

Class for generating a PART decision list. Uses separate-and-conquer. Builds a partial C4.5 decision tree in each iteration and makes the "best" leaf into a rule.

For more information, see:

Eibe Frank, Ian H. Witten: Generating Accurate Rule Sets Without Global Optimization. In: Fifteenth International Conference on Machine Learning, 144-151, 1998.

BibTeX:

 @inproceedings{Frank1998,
    author = {Eibe Frank and Ian H. Witten},
    booktitle = {Fifteenth International Conference on Machine Learning},
    editor = {J. Shavlik},
    pages = {144-151},
    publisher = {Morgan Kaufmann},
    title = {Generating Accurate Rule Sets Without Global Optimization},
    year = {1998},
    PS = {http://www.cs.waikato.ac.nz/\~eibe/pubs/ML98-57.ps.gz}
 }
 

Valid options are:

 -C <pruning confidence>
  Set confidence threshold for pruning.
  (default 0.25)
 -M <minimum number of objects>
  Set minimum number of objects per leaf.
  (default 2)
 -R
  Use reduced error pruning.
 -N <number of folds>
  Set number of folds for reduced error
  pruning. One fold is used as pruning set.
  (default 3)
 -B
  Use binary splits only.
 -U
  Generate unpruned decision list.
 -Q <seed>
  Seed for random data shuffling (default 1).
版本:
$Revision: 1.10 $
作者:
Eibe Frank (eibe@cs.waikato.ac.nz)
另请参阅:
  • 构造器详细资料

    • PART

      public PART()
  • 方法详细资料

    • globalInfo

      public String globalInfo()
      Returns a string describing classifier
      返回:
      a description suitable for displaying in the explorer/experimenter gui
    • 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 在类中 Classifier
      返回:
      the capabilities of this classifier
      另请参阅:
    • buildClassifier

      public void buildClassifier(Instances instances) throws Exception
      Generates the classifier.
      指定者:
      buildClassifier 在类中 Classifier
      参数:
      instances - the data to train with
      抛出:
      Exception - if classifier can't be built successfully
    • classifyInstance

      public double classifyInstance(Instance instance) throws Exception
      Classifies an instance.
      覆盖:
      classifyInstance 在类中 Classifier
      参数:
      instance - the instance to classify
      返回:
      the classification
      抛出:
      Exception - if instance can't be classified successfully
    • distributionForInstance

      public final double[] distributionForInstance(Instance instance) throws Exception
      Returns class probabilities for an instance.
      覆盖:
      distributionForInstance 在类中 Classifier
      参数:
      instance - the instance to get the distribution for
      返回:
      the class probabilities
      抛出:
      Exception - if the distribution can't be computed successfully
    • listOptions

      public Enumeration listOptions()
      Returns an enumeration describing the available options. Valid options are:

      -C confidence
      Set confidence threshold for pruning. (Default: 0.25)

      -M number
      Set minimum number of instances per leaf. (Default: 2)

      -R
      Use reduced error pruning.

      -N number
      Set number of folds for reduced error pruning. One fold is used as the pruning set. (Default: 3)

      -B
      Use binary splits for nominal attributes.

      -U
      Generate unpruned decision list.

      -Q
      The seed for reduced-error pruning.

      指定者:
      listOptions 在接口中 OptionHandler
      覆盖:
      listOptions 在类中 Classifier
      返回:
      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 <pruning confidence>
        Set confidence threshold for pruning.
        (default 0.25)
       -M <minimum number of objects>
        Set minimum number of objects per leaf.
        (default 2)
       -R
        Use reduced error pruning.
       -N <number of folds>
        Set number of folds for reduced error
        pruning. One fold is used as pruning set.
        (default 3)
       -B
        Use binary splits only.
       -U
        Generate unpruned decision list.
       -Q <seed>
        Seed for random data shuffling (default 1).
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 Classifier
      参数:
      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 Classifier.
      指定者:
      getOptions 在接口中 OptionHandler
      覆盖:
      getOptions 在类中 Classifier
      返回:
      an array of strings suitable for passing to setOptions
    • toString

      public String toString()
      Returns a description of the classifier
      覆盖:
      toString 在类中 Object
      返回:
      a string representation of the classifier
    • toSummaryString

      public String toSummaryString()
      Returns a superconcise version of the model
      指定者:
      toSummaryString 在接口中 Summarizable
      返回:
      a concise version of the model
    • measureNumRules

      public double measureNumRules()
      Return the number of rules.
      返回:
      the number of rules
    • enumerateMeasures

      public Enumeration enumerateMeasures()
      Returns an enumeration of the additional measure names
      指定者:
      enumerateMeasures 在接口中 AdditionalMeasureProducer
      返回:
      an enumeration of the measure names
    • getMeasure

      public double getMeasure(String additionalMeasureName)
      Returns the value of the named measure
      指定者:
      getMeasure 在接口中 AdditionalMeasureProducer
      参数:
      additionalMeasureName - the name of the measure to query for its value
      返回:
      the value of the named measure
      抛出:
      IllegalArgumentException - if the named measure is not supported
    • confidenceFactorTipText

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

      public float getConfidenceFactor()
      Get the value of CF.
      返回:
      Value of CF.
    • setConfidenceFactor

      public void setConfidenceFactor(float v)
      Set the value of CF.
      参数:
      v - Value to assign to CF.
    • minNumObjTipText

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

      public int getMinNumObj()
      Get the value of minNumObj.
      返回:
      Value of minNumObj.
    • setMinNumObj

      public void setMinNumObj(int v)
      Set the value of minNumObj.
      参数:
      v - Value to assign to minNumObj.
    • reducedErrorPruningTipText

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

      public boolean getReducedErrorPruning()
      Get the value of reducedErrorPruning.
      返回:
      Value of reducedErrorPruning.
    • setReducedErrorPruning

      public void setReducedErrorPruning(boolean v)
      Set the value of reducedErrorPruning.
      参数:
      v - Value to assign to reducedErrorPruning.
    • unprunedTipText

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

      public boolean getUnpruned()
      Get the value of unpruned.
      返回:
      Value of unpruned.
    • setUnpruned

      public void setUnpruned(boolean newunpruned)
      Set the value of unpruned.
      参数:
      newunpruned - Value to assign to unpruned.
    • numFoldsTipText

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

      public int getNumFolds()
      Get the value of numFolds.
      返回:
      Value of numFolds.
    • setNumFolds

      public void setNumFolds(int v)
      Set the value of numFolds.
      参数:
      v - Value to assign to numFolds.
    • seedTipText

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

      public int getSeed()
      Get the value of Seed.
      返回:
      Value of Seed.
    • setSeed

      public void setSeed(int newSeed)
      Set the value of Seed.
      参数:
      newSeed - Value to assign to Seed.
    • binarySplitsTipText

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

      public boolean getBinarySplits()
      Get the value of binarySplits.
      返回:
      Value of binarySplits.
    • setBinarySplits

      public void setBinarySplits(boolean v)
      Set the value of binarySplits.
      参数:
      v - Value to assign to binarySplits.
    • 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 - command line options