类 AdditiveRegression

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

Meta classifier that enhances the performance of a regression base classifier. Each iteration fits a model to the residuals left by the classifier on the previous iteration. Prediction is accomplished by adding the predictions of each classifier. Reducing the shrinkage (learning rate) parameter helps prevent overfitting and has a smoothing effect but increases the learning time.

For more information see:

J.H. Friedman (1999). Stochastic Gradient Boosting.

BibTeX:

 @techreport{Friedman1999,
    author = {J.H. Friedman},
    institution = {Stanford University},
    title = {Stochastic Gradient Boosting},
    year = {1999},
    PS = {http://www-stat.stanford.edu/\~jhf/ftp/stobst.ps}
 }
 

Valid options are:

 -S
  Specify shrinkage rate. (default = 1.0, ie. no shrinkage)
 
 -I <num>
  Number of iterations.
  (default 10)
 -D
  If set, classifier is run in debug mode and
  may output additional info to the console
 -W
  Full name of base classifier.
  (default: weka.classifiers.trees.DecisionStump)
 
 Options specific to classifier weka.classifiers.trees.DecisionStump:
 
 -D
  If set, classifier is run in debug mode and
  may output additional info to the console
版本:
$Revision: 1.25 $
作者:
Mark Hall (mhall@cs.waikato.ac.nz)
另请参阅:
  • 构造器详细资料

    • AdditiveRegression

      public AdditiveRegression()
      Default constructor specifying DecisionStump as the classifier
    • AdditiveRegression

      public AdditiveRegression(Classifier classifier)
      Constructor which takes base classifier as argument.
      参数:
      classifier - the base classifier to use
  • 方法详细资料

    • globalInfo

      public String globalInfo()
      Returns a string describing this attribute evaluator
      返回:
      a description of the evaluator 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
    • listOptions

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

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

      Valid options are:

       -S
        Specify shrinkage rate. (default = 1.0, ie. no shrinkage)
       
       -I <num>
        Number of iterations.
        (default 10)
       -D
        If set, classifier is run in debug mode and
        may output additional info to the console
       -W
        Full name of base classifier.
        (default: weka.classifiers.trees.DecisionStump)
       
       Options specific to classifier weka.classifiers.trees.DecisionStump:
       
       -D
        If set, classifier is run in debug mode and
        may output additional info to the console
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 IteratedSingleClassifierEnhancer
      参数:
      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 在类中 IteratedSingleClassifierEnhancer
      返回:
      an array of strings suitable for passing to setOptions
    • shrinkageTipText

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

      public void setShrinkage(double l)
      Set the shrinkage parameter
      参数:
      l - the shrinkage rate.
    • getShrinkage

      public double getShrinkage()
      Get the shrinkage rate.
      返回:
      the value of the learning rate
    • getCapabilities

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

      public void buildClassifier(Instances data) throws Exception
      Build the classifier on the supplied data
      覆盖:
      buildClassifier 在类中 IteratedSingleClassifierEnhancer
      参数:
      data - the training data
      抛出:
      Exception - if the classifier could not be built successfully
    • classifyInstance

      public double classifyInstance(Instance inst) throws Exception
      Classify an instance.
      覆盖:
      classifyInstance 在类中 Classifier
      参数:
      inst - the instance to predict
      返回:
      a prediction for the instance
      抛出:
      Exception - if an error occurs
    • 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
    • measureNumIterations

      public double measureNumIterations()
      return the number of iterations (base classifiers) completed
      返回:
      the number of iterations (same as number of base classifier models)
    • toString

      public String toString()
      Returns textual description of the classifier.
      覆盖:
      toString 在类中 Object
      返回:
      a description of the classifier as a string
    • 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]