Package weka.classifiers.misc
Class HyperPipes
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.misc.HyperPipes
- All Implemented Interfaces:
Serializable,Cloneable,CapabilitiesHandler,OptionHandler,RevisionHandler
Class implementing a HyperPipe classifier. For each category a HyperPipe is constructed that contains all points of that category (essentially records the attribute bounds observed for each category). Test instances are classified according to the category that "most contains the instance".
Does not handle numeric class, or missing values in test cases. Extremely simple algorithm, but has the advantage of being extremely fast, and works quite well when you have "smegloads" of attributes. Valid options are:
Does not handle numeric class, or missing values in test cases. Extremely simple algorithm, but has the advantage of being extremely fast, and works quite well when you have "smegloads" of attributes. Valid options are:
-D If set, classifier is run in debug mode and may output additional info to the console
- Version:
- $Revision: 5528 $
- Author:
- Lucio de Souza Coelho (lucio@intelligenesis.net), Len Trigg (len@reeltwo.com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildClassifier(Instances instances) Generates the classifier.double[]distributionForInstance(Instance instance) Classifies the given test instance.Returns default capabilities of the classifier.Returns the revision string.Returns a string describing classifierstatic voidMain method for testing this class.toString()Returns a description of this classifier.voidupdateClassifier(Instance instance) Updates the classifier.Methods inherited from class weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptions
-
Constructor Details
-
HyperPipes
public HyperPipes()
-
-
Method Details
-
globalInfo
Returns a string describing classifier- Returns:
- a description suitable for displaying in the explorer/experimenter gui
-
getCapabilities
Returns default capabilities of the classifier.- Specified by:
getCapabilitiesin interfaceCapabilitiesHandler- Overrides:
getCapabilitiesin classClassifier- Returns:
- the capabilities of this classifier
- See Also:
-
buildClassifier
Generates the classifier.- Specified by:
buildClassifierin classClassifier- Parameters:
instances- set of instances serving as training data- Throws:
Exception- if the classifier has not been generated successfully
-
updateClassifier
Updates the classifier.- Parameters:
instance- the instance to be put into the classifier- Throws:
Exception- if the instance could not be included successfully
-
distributionForInstance
Classifies the given test instance.- Overrides:
distributionForInstancein classClassifier- Parameters:
instance- the instance to be classified- Returns:
- the predicted class for the instance
- Throws:
Exception- if the instance can't be classified
-
toString
Returns a description of this classifier. -
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Overrides:
getRevisionin classClassifier- Returns:
- the revision
-
main
Main method for testing this class.- Parameters:
argv- should contain command line arguments for evaluation (see Evaluation).
-