Package weka.classifiers.meta
Class RandomizableFilteredClassifier
java.lang.Object
weka.classifiers.AbstractClassifier
weka.classifiers.SingleClassifierEnhancer
weka.classifiers.RandomizableSingleClassifierEnhancer
weka.classifiers.meta.FilteredClassifier
weka.classifiers.meta.RandomizableFilteredClassifier
- All Implemented Interfaces:
Serializable
,Cloneable
,Classifier
,IterativeClassifier
,BatchPredictor
,CapabilitiesHandler
,CapabilitiesIgnorer
,CommandlineRunnable
,Drawable
,OptionHandler
,PartitionGenerator
,Randomizable
,RevisionHandler
,WeightedAttributesHandler
,WeightedInstancesHandler
Class for running an arbitrary classifier on data that has been passed through an arbitrary filter. Like the classifier, the structure of the filter is based exclusively on the training data and test instances will be processed by the filter without changing their structure.
Valid options are:
-F <filter specification> Full class name of filter to use, followed by filter options. default: "weka.filters.unsupervised.attribute.RandomProjection -N 10 -D Sparse1"
-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.lazy.IBk)
-S num Set the random number seed (default 1).
Options specific to classifier weka.classifiers.lazy.IBk:
-I Weight neighbours by the inverse of their distance (use when k > 1)
-F Weight neighbours by 1 - their distance (use when k > 1)
-K <number of neighbors> Number of nearest neighbours (k) used in classification. (Default = 1)
-E Minimise mean squared error rather than mean absolute error when using -X option with numeric prediction.
-W <window size> Maximum number of training instances maintained. Training instances are dropped FIFO. (Default = no window)
-X Select the number of nearest neighbours between 1 and the k value specified using hold-one-out evaluation on the training data (use when k > 1)
-A The nearest neighbour search algorithm to use (default: weka.core.neighboursearch.LinearNNSearch).
- Version:
- $Revision: 9117 $
- Author:
- Eibe Frank
- See Also:
-
Field Summary
Fields inherited from class weka.classifiers.AbstractClassifier
BATCH_SIZE_DEFAULT, NUM_DECIMAL_PLACES_DEFAULT
Fields inherited from interface weka.core.Drawable
BayesNet, Newick, NOT_DRAWABLE, TREE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
buildClassifier
(Instances data) Build the classifier on the filtered data.Returns the revision string.Returns a string describing this classifiervoid
Initializes an iterative classifier.static void
Main method for testing this class.toString()
Output a representation of this classifierMethods inherited from class weka.classifiers.meta.FilteredClassifier
batchSizeTipText, distributionForInstance, distributionsForInstances, done, doNotCheckForModifiedClassAttributeTipText, filterTipText, generatePartition, getBatchSize, getCapabilities, getDoNotCheckForModifiedClassAttribute, getFilter, getMembershipValues, getOptions, getResume, graph, graphType, implementsMoreEfficientBatchPrediction, listOptions, next, numElements, resumeTipText, setBatchSize, setDoNotCheckForModifiedClassAttribute, setFilter, setOptions, setResume
Methods inherited from class weka.classifiers.RandomizableSingleClassifierEnhancer
getSeed, seedTipText, setSeed
Methods inherited from class weka.classifiers.SingleClassifierEnhancer
classifierTipText, getClassifier, postExecution, preExecution, setClassifier
Methods inherited from class weka.classifiers.AbstractClassifier
classifyInstance, debugTipText, doNotCheckCapabilitiesTipText, forName, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface weka.classifiers.Classifier
classifyInstance
-
Constructor Details
-
RandomizableFilteredClassifier
public RandomizableFilteredClassifier()Default constructor.
-
-
Method Details
-
globalInfo
Returns a string describing this classifier- Overrides:
globalInfo
in classFilteredClassifier
- Returns:
- a description of the classifier suitable for displaying in the explorer/experimenter gui
-
initializeClassifier
Initializes an iterative classifier. (If the base classifier supports this.)- Specified by:
initializeClassifier
in interfaceIterativeClassifier
- Overrides:
initializeClassifier
in classFilteredClassifier
- Parameters:
data
- the instances to be used in induction- Throws:
Exception
- if the model cannot be initialized
-
buildClassifier
Build the classifier on the filtered data.- Specified by:
buildClassifier
in interfaceClassifier
- Overrides:
buildClassifier
in classFilteredClassifier
- Parameters:
data
- the training data- Throws:
Exception
- if the classifier could not be built successfully
-
toString
Output a representation of this classifier- Overrides:
toString
in classFilteredClassifier
- Returns:
- a representation of this classifier
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Overrides:
getRevision
in classFilteredClassifier
- Returns:
- the revision
-
main
Main method for testing this class.- Parameters:
argv
- should contain the following arguments: -t training file [-T test file] [-c class index]
-