类 Dagging
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.SingleClassifierEnhancer
weka.classifiers.RandomizableSingleClassifierEnhancer
weka.classifiers.meta.Dagging
- 所有已实现的接口:
Serializable
,Cloneable
,CapabilitiesHandler
,OptionHandler
,Randomizable
,RevisionHandler
,TechnicalInformationHandler
public class Dagging
extends RandomizableSingleClassifierEnhancer
implements TechnicalInformationHandler
This meta classifier creates a number of disjoint, stratified folds out of the data and feeds each chunk of data to a copy of the supplied base classifier. Predictions are made via majority vote, since all the generated base classifiers are put into the Vote meta classifier.
Useful for base classifiers that are quadratic or worse in time behavior, regarding number of instances in the training data.
For more information, see:
Ting, K. M., Witten, I. H.: Stacking Bagged and Dagged Models. In: Fourteenth international Conference on Machine Learning, San Francisco, CA, 367-375, 1997. BibTeX:
Useful for base classifiers that are quadratic or worse in time behavior, regarding number of instances in the training data.
For more information, see:
Ting, K. M., Witten, I. H.: Stacking Bagged and Dagged Models. In: Fourteenth international Conference on Machine Learning, San Francisco, CA, 367-375, 1997. BibTeX:
@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.functions.SMO)
Options specific to classifier weka.classifiers.functions.SMO:
-D If set, classifier is run in debug mode and may output additional info to the console
-no-checks Turns off all checks - use with caution! Turning them off assumes that data is purely numeric, doesn't contain any missing values, and has a nominal class. Turning them off also means that no header information will be stored if the machine is linear. Finally, it also assumes that no instance has a weight equal to 0. (default: checks on)
-C <double> The complexity constant C. (default 1)
-N Whether to 0=normalize/1=standardize/2=neither. (default 0=normalize)
-L <double> The tolerance parameter. (default 1.0e-3)
-P <double> The epsilon for round-off error. (default 1.0e-12)
-M Fit logistic models to SVM outputs.
-V <double> The number of folds for the internal cross-validation. (default -1, use training data)
-W <double> The random number seed. (default 1)
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
Options specific to kernel weka.classifiers.functions.supportVector.PolyKernel:
-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)Options after -- are passed to the designated classifier.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances data) Bagging method.double[]
distributionForInstance
(Instance instance) Calculates the class membership probabilities for the given test instance.int
Gets the number of folds to use for splitting the training set.String[]
Gets the current settings of the Classifier.Returns the revision string.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
Gets the verbose stateReturns a string describing classifierReturns an enumeration describing the available options.static void
Main method for testing this class.Returns the tip text for this propertyvoid
setNumFolds
(int value) Sets the number of folds to use for splitting the training set.void
setOptions
(String[] options) Parses a given list of options.void
setVerbose
(boolean value) Set the verbose state.toString()
Returns description of the classifier.Returns the tip text for this property从类继承的方法 weka.classifiers.RandomizableSingleClassifierEnhancer
getSeed, seedTipText, setSeed
从类继承的方法 weka.classifiers.SingleClassifierEnhancer
classifierTipText, getCapabilities, getClassifier, setClassifier
从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
构造器详细资料
-
Dagging
public Dagging()Constructor.
-
-
方法详细资料
-
globalInfo
Returns a string describing classifier- 返回:
- a description suitable for displaying in the explorer/experimenter gui
-
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
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中RandomizableSingleClassifierEnhancer
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. 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.functions.SMO)
Options specific to classifier weka.classifiers.functions.SMO:
-D If set, classifier is run in debug mode and may output additional info to the console
-no-checks Turns off all checks - use with caution! Turning them off assumes that data is purely numeric, doesn't contain any missing values, and has a nominal class. Turning them off also means that no header information will be stored if the machine is linear. Finally, it also assumes that no instance has a weight equal to 0. (default: checks on)
-C <double> The complexity constant C. (default 1)
-N Whether to 0=normalize/1=standardize/2=neither. (default 0=normalize)
-L <double> The tolerance parameter. (default 1.0e-3)
-P <double> The epsilon for round-off error. (default 1.0e-12)
-M Fit logistic models to SVM outputs.
-V <double> The number of folds for the internal cross-validation. (default -1, use training data)
-W <double> The random number seed. (default 1)
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
Options specific to kernel weka.classifiers.functions.supportVector.PolyKernel:
-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
Options after -- are passed to the designated classifier.- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中RandomizableSingleClassifierEnhancer
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the Classifier.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中RandomizableSingleClassifierEnhancer
- 返回:
- an array of strings suitable for passing to setOptions
-
getNumFolds
public int getNumFolds()Gets the number of folds to use for splitting the training set.- 返回:
- the number of folds
-
setNumFolds
public void setNumFolds(int value) Sets the number of folds to use for splitting the training set.- 参数:
value
- the new number of folds
-
numFoldsTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setVerbose
public void setVerbose(boolean value) Set the verbose state.- 参数:
value
- the verbose state
-
getVerbose
public boolean getVerbose()Gets the verbose state- 返回:
- the verbose state
-
verboseTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
buildClassifier
Bagging method.- 指定者:
buildClassifier
在类中Classifier
- 参数:
data
- the training data to be used for generating the bagged classifier.- 抛出:
Exception
- if the classifier could not be built successfully
-
distributionForInstance
Calculates the class membership probabilities for the given test instance.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
instance
- the instance to be classified- 返回:
- preedicted class probability distribution
- 抛出:
Exception
- if distribution can't be computed successfully
-
toString
Returns description of the classifier. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method for testing this class.- 参数:
args
- the options
-