Package weka.classifiers.meta
Class RacedIncrementalLogitBoost
- java.lang.Object
-
- weka.classifiers.Classifier
-
- weka.classifiers.SingleClassifierEnhancer
-
- weka.classifiers.RandomizableSingleClassifierEnhancer
-
- weka.classifiers.meta.RacedIncrementalLogitBoost
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,UpdateableClassifier
,CapabilitiesHandler
,OptionHandler
,Randomizable
,RevisionHandler
,TechnicalInformationHandler
public class RacedIncrementalLogitBoost extends RandomizableSingleClassifierEnhancer implements UpdateableClassifier, TechnicalInformationHandler
Classifier for incremental learning of large datasets by way of racing logit-boosted committees.
For more information see:
Eibe Frank, Geoffrey Holmes, Richard Kirkby, Mark Hall: Racing committees for large datasets. In: Proceedings of the 5th International Conferenceon Discovery Science, 153-164, 2002. BibTeX:@inproceedings{Frank2002, author = {Eibe Frank and Geoffrey Holmes and Richard Kirkby and Mark Hall}, booktitle = {Proceedings of the 5th International Conferenceon Discovery Science}, pages = {153-164}, publisher = {Springer}, title = { Racing committees for large datasets}, year = {2002} }
Valid options are:-C <num> Minimum size of chunks. (default 500)
-M <num> Maximum size of chunks. (default 2000)
-V <num> Size of validation set. (default 1000)
-P <pruning type> Committee pruning to perform. 0=none, 1=log likelihood (default)
-Q Use resampling for boosting.
-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 specific to classifier weka.classifiers.trees.DecisionStump:
-D If set, classifier is run in debug mode and may output additional info to the console
Options after -- are passed to the designated learner.- Version:
- $Revision: 6477 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz), Eibe Frank (eibe@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
PRUNETYPE_LOGLIKELIHOOD
log likelihood pruningstatic int
PRUNETYPE_NONE
no pruningstatic Tag[]
TAGS_PRUNETYPE
The pruning types
-
Constructor Summary
Constructors Constructor Description RacedIncrementalLogitBoost()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildClassifier(Instances data)
Builds the classifier.double[]
distributionForInstance(Instance instance)
Computes class distribution of an instance using the best committee.int
getBestCommitteeChunkSize()
Get the best committee chunk sizedouble
getBestCommitteeErrorEstimate()
Get the best committee's error on the validation datadouble
getBestCommitteeLLEstimate()
Get the best committee's log likelihood on the validation dataint
getBestCommitteeSize()
Get the number of members in the best committeeCapabilities
getCapabilities()
Returns default capabilities of the classifier.int
getMaxChunkSize()
Get the maximum chunk sizeint
getMinChunkSize()
Get the minimum chunk sizejava.lang.String[]
getOptions()
Gets the current settings of the Classifier.SelectedTag
getPruningType()
Get the pruning typejava.lang.String
getRevision()
Returns the revision string.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
getUseResampling()
Get whether resampling is turned onint
getValidationChunkSize()
Get the validation chunk sizejava.lang.String
globalInfo()
java.util.Enumeration
listOptions()
Returns an enumeration describing the available optionsstatic void
main(java.lang.String[] argv)
Main method for this class.java.lang.String
maxChunkSizeTipText()
java.lang.String
minChunkSizeTipText()
java.lang.String
pruningTypeTipText()
void
setClassifier(Classifier newClassifier)
Set the base learner.void
setMaxChunkSize(int chunkSize)
Set the maximum chunk sizevoid
setMinChunkSize(int chunkSize)
Set the minimum chunk sizevoid
setOptions(java.lang.String[] options)
Parses a given list of options.void
setPruningType(SelectedTag pruneType)
Set the pruning typevoid
setUseResampling(boolean r)
Set resampling modevoid
setValidationChunkSize(int chunkSize)
Set the validation chunk sizejava.lang.String
toString()
Returns description of the boosted classifier.void
updateClassifier(Instance instance)
Updates the classifier.java.lang.String
useResamplingTipText()
java.lang.String
validationChunkSizeTipText()
-
Methods inherited from class weka.classifiers.RandomizableSingleClassifierEnhancer
getSeed, seedTipText, setSeed
-
Methods inherited from class weka.classifiers.SingleClassifierEnhancer
classifierTipText, getClassifier
-
Methods inherited from class weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
-
-
-
Field Detail
-
PRUNETYPE_NONE
public static final int PRUNETYPE_NONE
no pruning- See Also:
- Constant Field Values
-
PRUNETYPE_LOGLIKELIHOOD
public static final int PRUNETYPE_LOGLIKELIHOOD
log likelihood pruning- See Also:
- Constant Field Values
-
TAGS_PRUNETYPE
public static final Tag[] TAGS_PRUNETYPE
The pruning types
-
-
Method Detail
-
getCapabilities
public Capabilities getCapabilities()
Returns default capabilities of the classifier.- Specified by:
getCapabilities
in interfaceCapabilitiesHandler
- Overrides:
getCapabilities
in classSingleClassifierEnhancer
- Returns:
- the capabilities of this classifier
- See Also:
Capabilities
-
buildClassifier
public void buildClassifier(Instances data) throws java.lang.Exception
Builds the classifier.- Specified by:
buildClassifier
in classClassifier
- Parameters:
data
- the instances to train the classifier with- Throws:
java.lang.Exception
- if something goes wrong
-
updateClassifier
public void updateClassifier(Instance instance) throws java.lang.Exception
Updates the classifier.- Specified by:
updateClassifier
in interfaceUpdateableClassifier
- Parameters:
instance
- the next instance in the stream of training data- Throws:
java.lang.Exception
- if something goes wrong
-
distributionForInstance
public double[] distributionForInstance(Instance instance) throws java.lang.Exception
Computes class distribution of an instance using the best committee.- Overrides:
distributionForInstance
in classClassifier
- Parameters:
instance
- the instance to get the distribution for- Returns:
- the distribution
- Throws:
java.lang.Exception
- if anything goes wrong
-
listOptions
public java.util.Enumeration listOptions()
Returns an enumeration describing the available options- Specified by:
listOptions
in interfaceOptionHandler
- Overrides:
listOptions
in classRandomizableSingleClassifierEnhancer
- 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:-C <num> Minimum size of chunks. (default 500)
-M <num> Maximum size of chunks. (default 2000)
-V <num> Size of validation set. (default 1000)
-P <pruning type> Committee pruning to perform. 0=none, 1=log likelihood (default)
-Q Use resampling for boosting.
-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 specific to classifier weka.classifiers.trees.DecisionStump:
-D If set, classifier is run in debug mode and may output additional info to the console
- Specified by:
setOptions
in interfaceOptionHandler
- Overrides:
setOptions
in classRandomizableSingleClassifierEnhancer
- 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.- Specified by:
getOptions
in interfaceOptionHandler
- Overrides:
getOptions
in classRandomizableSingleClassifierEnhancer
- Returns:
- an array of strings suitable for passing to setOptions
-
globalInfo
public java.lang.String globalInfo()
- Returns:
- a description of the classifier 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.- Specified by:
getTechnicalInformation
in interfaceTechnicalInformationHandler
- Returns:
- the technical information about this class
-
setClassifier
public void setClassifier(Classifier newClassifier)
Set the base learner.- Overrides:
setClassifier
in classSingleClassifierEnhancer
- Parameters:
newClassifier
- the classifier to use.- Throws:
java.lang.IllegalArgumentException
- if base classifier cannot handle numeric class
-
minChunkSizeTipText
public java.lang.String minChunkSizeTipText()
- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setMinChunkSize
public void setMinChunkSize(int chunkSize)
Set the minimum chunk size- Parameters:
chunkSize
- the minimum chunk size
-
getMinChunkSize
public int getMinChunkSize()
Get the minimum chunk size- Returns:
- the chunk size
-
maxChunkSizeTipText
public java.lang.String maxChunkSizeTipText()
- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setMaxChunkSize
public void setMaxChunkSize(int chunkSize)
Set the maximum chunk size- Parameters:
chunkSize
- the maximum chunk size
-
getMaxChunkSize
public int getMaxChunkSize()
Get the maximum chunk size- Returns:
- the chunk size
-
validationChunkSizeTipText
public java.lang.String validationChunkSizeTipText()
- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setValidationChunkSize
public void setValidationChunkSize(int chunkSize)
Set the validation chunk size- Parameters:
chunkSize
- the validation chunk size
-
getValidationChunkSize
public int getValidationChunkSize()
Get the validation chunk size- Returns:
- the chunk size
-
pruningTypeTipText
public java.lang.String pruningTypeTipText()
- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setPruningType
public void setPruningType(SelectedTag pruneType)
Set the pruning type- Parameters:
pruneType
- the pruning type
-
getPruningType
public SelectedTag getPruningType()
Get the pruning type- Returns:
- the type
-
useResamplingTipText
public java.lang.String useResamplingTipText()
- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setUseResampling
public void setUseResampling(boolean r)
Set resampling mode- Parameters:
r
- true if resampling should be done
-
getUseResampling
public boolean getUseResampling()
Get whether resampling is turned on- Returns:
- true if resampling output is on
-
getBestCommitteeChunkSize
public int getBestCommitteeChunkSize()
Get the best committee chunk size- Returns:
- the best committee chunk size
-
getBestCommitteeSize
public int getBestCommitteeSize()
Get the number of members in the best committee- Returns:
- the number of members
-
getBestCommitteeErrorEstimate
public double getBestCommitteeErrorEstimate()
Get the best committee's error on the validation data- Returns:
- the best committee's error
-
getBestCommitteeLLEstimate
public double getBestCommitteeLLEstimate()
Get the best committee's log likelihood on the validation data- Returns:
- best committee's log likelihood
-
toString
public java.lang.String toString()
Returns description of the boosted classifier.- Overrides:
toString
in classjava.lang.Object
- Returns:
- description of the boosted classifier as a string
-
getRevision
public java.lang.String getRevision()
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Overrides:
getRevision
in classClassifier
- Returns:
- the revision
-
main
public static void main(java.lang.String[] argv)
Main method for this class.- Parameters:
argv
- the commandline parameters
-
-