All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.classifiers.AdditiveRegression
java.lang.Object
|
+----weka.classifiers.Classifier
|
+----weka.classifiers.AdditiveRegression
- public class AdditiveRegression
- extends Classifier
- implements OptionHandler, AdditionalMeasureProducer
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. Smoothing is accomplished
through varying the shrinkage (learning rate) parameter.
Analysing: Root_relative_squared_error
Datasets: 36
Resultsets: 2
Confidence: 0.05 (two tailed)
Date: 10/13/00 10:00 AM
Dataset (1) m5.M5Prim | (2) AdditiveRegression -S 0.7 \
| -B weka.classifiers.m5.M5Prime
----------------------------
auto93.names (10) 54.4 | 49.41 *
autoHorse.names (10) 32.76 | 26.34 *
autoMpg.names (10) 35.32 | 34.84 *
autoPrice.names (10) 40.01 | 36.57 *
baskball (10) 79.46 | 79.85
bodyfat.names (10) 10.38 | 11.41 v
bolts (10) 19.29 | 12.61 *
breastTumor (10) 96.95 | 96.23 *
cholesterol (10) 101.03 | 98.88 *
cleveland (10) 71.29 | 70.87 *
cloud (10) 38.82 | 39.18
cpu (10) 22.26 | 14.74 *
detroit (10) 228.16 | 83.7 *
echoMonths (10) 71.52 | 69.15 *
elusage (10) 48.94 | 49.03
fishcatch (10) 16.61 | 15.36 *
fruitfly (10) 100 | 100 *
gascons (10) 18.72 | 14.26 *
housing (10) 38.62 | 36.53 *
hungarian (10) 74.67 | 72.19 *
longley (10) 31.23 | 28.26 *
lowbwt (10) 62.26 | 61.48 *
mbagrade (10) 89.2 | 89.2
meta (10) 163.15 | 188.28 v
pbc (10) 81.35 | 79.4 *
pharynx (10) 105.41 | 105.03
pollution (10) 72.24 | 68.16 *
pwLinear (10) 32.42 | 33.33 v
quake (10) 100.21 | 99.93
schlvote (10) 92.41 | 98.23 v
sensory (10) 88.03 | 87.94
servo (10) 37.07 | 35.5 *
sleep (10) 70.17 | 71.65
strike (10) 84.98 | 83.96 *
veteran (10) 90.61 | 88.77 *
vineyard (10) 79.41 | 73.95 *
----------------------------
(v| |*) | (4|8|24)
For more information see:
Friedman, J.H. (1999). Stochastic Gradient Boosting. Technical Report
Stanford University. http://www-stat.stanford.edu/~jhf/ftp/stobst.ps.
Valid options from the command line are:
-B classifierstring
Classifierstring should contain the full class name of a classifier
followed by options to the classifier.
(required).
-S shrinkage rate
Smaller values help prevent overfitting and have a smoothing effect
(but increase learning time).
(default = 1.0, ie no shrinkage).
-M max models
Set the maximum number of models to generate. Values <= 0 indicate
no maximum, ie keep going until the reduction in error threshold is
reached.
(default = -1).
-D
Debugging output.
- Version:
- $Revision: 1.6 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
AdditiveRegression()
- Default constructor specifying DecisionStump as the classifier
AdditiveRegression(Classifier)
- Constructor which takes base classifier as argument.
buildClassifier(Instances)
- Build the classifier on the supplied data
classifierTipText()
- Returns the tip text for this property
classifyInstance(Instance)
- Classify an instance.
debugTipText()
- Returns the tip text for this property
enumerateMeasures()
- Returns an enumeration of the additional measure names
getClassifier()
- Gets the classifier used.
getDebug()
- Gets whether debugging has been turned on
getMaxModels()
- Get the max number of models to generate
getMeasure(String)
- Returns the value of the named measure
getOptions()
- Gets the current settings of the Classifier.
getShrinkage()
- Get the shrinkage rate.
globalInfo()
- Returns a string describing this attribute evaluator
listOptions()
- Returns an enumeration describing the available options
main(String[])
- Main method for testing this class.
maxModelsTipText()
- Returns the tip text for this property
measureNumIterations()
- return the number of iterations (base classifiers) completed
setClassifier(Classifier)
- Sets the classifier
setDebug(boolean)
- Set whether debugging output is produced.
setMaxModels(int)
- Set the maximum number of models to generate
setOptions(String[])
- Parses a given list of options.
setShrinkage(double)
- Set the shrinkage parameter
shrinkageTipText()
- Returns the tip text for this property
toString()
- Returns textual description of the classifier.
AdditiveRegression
public AdditiveRegression()
Default constructor specifying DecisionStump as the classifier
AdditiveRegression
public AdditiveRegression(Classifier classifier)
Constructor which takes base classifier as argument.
- Parameters:
classifier
- the base classifier to use
globalInfo
public java.lang.String globalInfo()
Returns a string describing this attribute evaluator
- Returns:
- a description of the evaluator suitable for
displaying in the explorer/experimenter gui
listOptions
public java.util.Enumeration listOptions()
Returns an enumeration describing the available options
- Returns:
- an enumeration of all the available options
setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
Parses a given list of options. Valid options are:
-B classifierstring
Classifierstring should contain the full class name of a classifier
followed by options to the classifier.
(required).
-S shrinkage rate
Smaller values help prevent overfitting and have a smoothing effect
(but increase learning time).
(default = 1.0, ie. no shrinkage).
-D
Debugging output.
-M max models
Set the maximum number of models to generate. Values <= 0 indicate
no maximum, ie keep going until the reduction in error threshold is
reached.
(default = -1).
- Parameters:
options
- the list of options as an array of strings
- Throws:
- java.lang.Exception - if an option is not supported
getOptions
public java.lang.String[] getOptions()
Gets the current settings of the Classifier.
- Returns:
- an array of strings suitable for passing to setOptions
debugTipText
public java.lang.String debugTipText()
Returns the tip text for this property
- Returns:
- tip text for this property suitable for
displaying in the explorer/experimenter gui
setDebug
public void setDebug(boolean d)
Set whether debugging output is produced.
- Parameters:
d
- true if debugging output is to be produced
getDebug
public boolean getDebug()
Gets whether debugging has been turned on
- Returns:
- true if debugging has been turned on
classifierTipText
public java.lang.String classifierTipText()
Returns the tip text for this property
- Returns:
- tip text for this property suitable for
displaying in the explorer/experimenter gui
setClassifier
public void setClassifier(Classifier classifier)
Sets the classifier
- Parameters:
classifier
- the classifier with all options set.
getClassifier
public Classifier getClassifier()
Gets the classifier used.
- Returns:
- the classifier
maxModelsTipText
public java.lang.String maxModelsTipText()
Returns the tip text for this property
- Returns:
- tip text for this property suitable for
displaying in the explorer/experimenter gui
setMaxModels
public void setMaxModels(int maxM)
Set the maximum number of models to generate
- Parameters:
maxM
- the maximum number of models
getMaxModels
public int getMaxModels()
Get the max number of models to generate
- Returns:
- the max number of models to generate
shrinkageTipText
public java.lang.String shrinkageTipText()
Returns the tip text for this property
- Returns:
- tip text for this property suitable for
displaying in the explorer/experimenter gui
setShrinkage
public void setShrinkage(double l)
Set the shrinkage parameter
- Parameters:
l
- the shrinkage rate.
getShrinkage
public double getShrinkage()
Get the shrinkage rate.
- Returns:
- the value of the learning rate
buildClassifier
public void buildClassifier(Instances data) throws java.lang.Exception
Build the classifier on the supplied data
- Parameters:
data
- the training data
- Throws:
- java.lang.Exception - if the classifier could not be built successfully
- Overrides:
- buildClassifier in class Classifier
classifyInstance
public double classifyInstance(Instance inst) throws java.lang.Exception
Classify an instance.
- Parameters:
inst
- the instance to predict
- Returns:
- a prediction for the instance
- Throws:
- java.lang.Exception - if an error occurs
- Overrides:
- classifyInstance in class Classifier
enumerateMeasures
public java.util.Enumeration enumerateMeasures()
Returns an enumeration of the additional measure names
- Returns:
- an enumeration of the measure names
getMeasure
public double getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure
- Parameters:
measureName
- the name of the measure to query for its value
- Returns:
- the value of the named measure
- Throws:
- java.lang.IllegalArgumentException - if the named measure is not supported
measureNumIterations
public double measureNumIterations()
return the number of iterations (base classifiers) completed
- Returns:
- the number of iterations (same as number of base classifier
models)
toString
public java.lang.String toString()
Returns textual description of the classifier.
- Returns:
- a description of the classifier as a string
- Overrides:
- toString in class java.lang.Object
main
public static void main(java.lang.String argv[])
Main method for testing this class.
- Parameters:
argv
- should contain the following arguments:
-t training file [-T test file] [-c class index]
All Packages Class Hierarchy This Package Previous Next Index WEKA's home