public class Dagging
extends weka.classifiers.RandomizableSingleClassifierEnhancer
implements weka.core.TechnicalInformationHandler
@inproceedings{Ting1997, address = {San Francisco, CA}, author = {Ting, K. M. and Witten, I. H.}, booktitle = {Fourteenth international Conference on Machine Learning}, editor = {D. H. Fisher}, pages = {367-375}, publisher = {Morgan Kaufmann Publishers}, title = {Stacking Bagged and Dagged Models}, year = {1997} }Valid options are:
-F <folds> The number of folds for splitting the training set into smaller chunks for the base classifier. (default 10)
-verbose Whether to print some more information during building the classifier. (default is off)
-S <num> Random number seed. (default 1)
-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 after -- are passed to the designated classifier.
Vote
,
Serialized FormConstructor and Description |
---|
Dagging()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(weka.core.Instances data)
Bagging method.
|
double[] |
distributionForInstance(weka.core.Instance instance)
Calculates the class membership probabilities for the given test instance.
|
int |
getNumFolds()
Gets the number of folds to use for splitting the training set.
|
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
weka.core.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.
|
boolean |
getVerbose()
Gets the verbose state
|
java.lang.String |
globalInfo()
Returns a string describing classifier
|
java.util.Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] args)
Main method for testing this class.
|
java.lang.String |
numFoldsTipText()
Returns the tip text for this property
|
void |
setNumFolds(int value)
Sets the number of folds to use for splitting the training set.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setVerbose(boolean value)
Set the verbose state.
|
java.lang.String |
toString()
Returns description of the classifier.
|
java.lang.String |
verboseTipText()
Returns the tip text for this property
|
getSeed, seedTipText, setSeed
classifierTipText, getCapabilities, getClassifier, postExecution, preExecution, setClassifier
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
public java.lang.String globalInfo()
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface weka.core.TechnicalInformationHandler
public java.util.Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.classifiers.RandomizableSingleClassifierEnhancer
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-F <folds> The number of folds for splitting the training set into smaller chunks for the base classifier. (default 10)
-verbose Whether to print some more information during building the classifier. (default is off)
-S <num> Random number seed. (default 1)
-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 after -- are passed to the designated classifier.
setOptions
in interface weka.core.OptionHandler
setOptions
in class weka.classifiers.RandomizableSingleClassifierEnhancer
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class weka.classifiers.RandomizableSingleClassifierEnhancer
public int getNumFolds()
public void setNumFolds(int value)
value
- the new number of foldspublic java.lang.String numFoldsTipText()
public void setVerbose(boolean value)
value
- the verbose statepublic boolean getVerbose()
public java.lang.String verboseTipText()
public void buildClassifier(weka.core.Instances data) throws java.lang.Exception
buildClassifier
in interface weka.classifiers.Classifier
data
- the training data to be used for generating the bagged
classifier.java.lang.Exception
- if the classifier could not be built successfullypublic double[] distributionForInstance(weka.core.Instance instance) throws java.lang.Exception
distributionForInstance
in interface weka.classifiers.Classifier
distributionForInstance
in class weka.classifiers.AbstractClassifier
instance
- the instance to be classifiedjava.lang.Exception
- if distribution can't be computed successfullypublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface weka.core.RevisionHandler
getRevision
in class weka.classifiers.AbstractClassifier
public static void main(java.lang.String[] args)
args
- the options