Package weka.classifiers.meta
Class HighLowSplit
- java.lang.Object
-
- weka.classifiers.AbstractClassifier
-
- weka.classifiers.SingleClassifierEnhancer
-
- weka.classifiers.meta.HighLowSplit
-
- All Implemented Interfaces:
Serializable
,Cloneable
,weka.classifiers.Classifier
,weka.core.BatchPredictor
,weka.core.CapabilitiesHandler
,weka.core.CapabilitiesIgnorer
,weka.core.CommandlineRunnable
,weka.core.OptionHandler
,weka.core.RevisionHandler
,weka.core.WeightedInstancesHandler
public class HighLowSplit extends weka.classifiers.SingleClassifierEnhancer implements weka.core.WeightedInstancesHandler
Uses base classifier to get guess, then get prediction from either lo/hi classifier
Valid options are:
-W Full name of base classifier. (default: weka.classifiers.rules.ZeroR)
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
Options specific to classifier weka.classifiers.rules.ZeroR:
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-S <dbl> Lowest value for hi classifier (default: 10)
-P <dbl> Highest value for lo classifier (default: 15)
-E <dbl> Decision boundary for hi/lo classifier (default: 12.5)
-F Full name of hi classifier. (default: weka.classifiers.rules.ZeroR)
-W Full name of base classifier. (default: weka.classifiers.rules.ZeroR)
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
Options specific to classifier weka.classifiers.rules.ZeroR:
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
Options specific to classifier weka.classifiers.rules.ZeroR:
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-G Full name of lo classifier. (default: weka.classifiers.rules.ZeroR)
-W Full name of base classifier. (default: weka.classifiers.rules.ZeroR)
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
Options specific to classifier weka.classifiers.rules.ZeroR:
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
Options specific to classifier weka.classifiers.rules.ZeroR:
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
- Version:
- $Revision: 6936 $
- Author:
- Dale?
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.classifiers.Classifier
m_hiClassifier
protected double
m_hiLopoint
protected weka.classifiers.Classifier
m_loClassifier
protected double
m_loHipoint
protected double
m_splitpoint
-
Constructor Summary
Constructors Constructor Description HighLowSplit()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildClassifier(weka.core.Instances data)
Builds the classifier.double
classifyInstance(weka.core.Instance inst)
Returns the prediction.protected String[]
defaultClassifierOptions()
String describing options for default classifier.protected String
defaultClassifierString()
String describing default classifier.weka.core.Capabilities
getCapabilities()
Returns default capabilities of the base classifier.weka.classifiers.Classifier
getHiClassifier()
double
getHiLopoint()
weka.classifiers.Classifier
getLoClassifier()
double
getLoHipoint()
String[]
getOptions()
Gets the current option settings for the OptionHandler.String
getRevision()
double
getSplitpoint()
String
globalInfo()
Returns a string describing classifier.String
hiClassifierTipText()
String
hiLopointTipText()
Enumeration
listOptions()
Returns an enumeration describing the available options.String
loClassifierTipText()
String
loHipointTipText()
static void
main(String[] argv)
Main method for running this class.void
setHiClassifier(weka.classifiers.Classifier c)
void
setHiLopoint(double h)
void
setLoClassifier(weka.classifiers.Classifier c)
void
setLoHipoint(double l)
void
setOptions(String[] options)
Sets the OptionHandler's options using the given list.void
setSplitpoint(double s)
String
splitpointTipText()
String
toString()
Returns description of classifier.-
Methods inherited from class weka.classifiers.SingleClassifierEnhancer
classifierTipText, getClassifier, getClassifierSpec, postExecution, preExecution, setClassifier
-
Methods inherited from class weka.classifiers.AbstractClassifier
batchSizeTipText, debugTipText, distributionForInstance, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing classifier.- Returns:
- a description suitable for displaying in the explorer/experimenter gui
-
defaultClassifierString
protected String defaultClassifierString()
String describing default classifier.- Overrides:
defaultClassifierString
in classweka.classifiers.SingleClassifierEnhancer
-
defaultClassifierOptions
protected String[] defaultClassifierOptions()
String describing options for default classifier.- Overrides:
defaultClassifierOptions
in classweka.classifiers.SingleClassifierEnhancer
-
listOptions
public Enumeration listOptions()
Returns an enumeration describing the available options.- Specified by:
listOptions
in interfaceweka.core.OptionHandler
- Overrides:
listOptions
in classweka.classifiers.SingleClassifierEnhancer
- Returns:
- an enumeration of all the available options.
-
setOptions
public void setOptions(String[] options) throws Exception
Sets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible). Valid options are:
-W Full name of base classifier. (default: weka.classifiers.rules.ZeroR)
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
Options specific to classifier weka.classifiers.rules.ZeroR:
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-S <dbl> Lowest value for hi classifier (default: 10)
-P <dbl> Highest value for lo classifier (default: 15)
-E <dbl> Decision boundary for hi/lo classifier (default: 12.5)
-F Full name of hi classifier. (default: weka.classifiers.rules.ZeroR)
-W Full name of base classifier. (default: weka.classifiers.rules.ZeroR)
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
Options specific to classifier weka.classifiers.rules.ZeroR:
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
Options specific to classifier weka.classifiers.rules.ZeroR:
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-G Full name of lo classifier. (default: weka.classifiers.rules.ZeroR)
-W Full name of base classifier. (default: weka.classifiers.rules.ZeroR)
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
Options specific to classifier weka.classifiers.rules.ZeroR:
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
Options specific to classifier weka.classifiers.rules.ZeroR:
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
- Specified by:
setOptions
in interfaceweka.core.OptionHandler
- Overrides:
setOptions
in classweka.classifiers.SingleClassifierEnhancer
- Parameters:
options
- the list of options as an array of strings- Throws:
Exception
- if an option is not supported
-
getOptions
public String[] getOptions()
Gets the current option settings for the OptionHandler.- Specified by:
getOptions
in interfaceweka.core.OptionHandler
- Overrides:
getOptions
in classweka.classifiers.SingleClassifierEnhancer
- Returns:
- the list of current option settings as an array of strings
-
getHiLopoint
public double getHiLopoint()
-
setHiLopoint
public void setHiLopoint(double h)
-
hiLopointTipText
public String hiLopointTipText()
-
getLoHipoint
public double getLoHipoint()
-
setLoHipoint
public void setLoHipoint(double l)
-
loHipointTipText
public String loHipointTipText()
-
getSplitpoint
public double getSplitpoint()
-
setSplitpoint
public void setSplitpoint(double s)
-
splitpointTipText
public String splitpointTipText()
-
getHiClassifier
public weka.classifiers.Classifier getHiClassifier()
-
setHiClassifier
public void setHiClassifier(weka.classifiers.Classifier c)
-
hiClassifierTipText
public String hiClassifierTipText()
-
getLoClassifier
public weka.classifiers.Classifier getLoClassifier()
-
setLoClassifier
public void setLoClassifier(weka.classifiers.Classifier c)
-
loClassifierTipText
public String loClassifierTipText()
-
getCapabilities
public weka.core.Capabilities getCapabilities()
Returns default capabilities of the base classifier.- Specified by:
getCapabilities
in interfaceweka.core.CapabilitiesHandler
- Specified by:
getCapabilities
in interfaceweka.classifiers.Classifier
- Overrides:
getCapabilities
in classweka.classifiers.SingleClassifierEnhancer
- Returns:
- the capabilities of the base classifier
-
buildClassifier
public void buildClassifier(weka.core.Instances data) throws Exception
Builds the classifier.- Specified by:
buildClassifier
in interfaceweka.classifiers.Classifier
- Parameters:
data
- the training data- Throws:
Exception
- if something goes wrong
-
classifyInstance
public double classifyInstance(weka.core.Instance inst) throws Exception
Returns the prediction.- Specified by:
classifyInstance
in interfaceweka.classifiers.Classifier
- Overrides:
classifyInstance
in classweka.classifiers.AbstractClassifier
- Throws:
Exception
-
toString
public String toString()
Returns description of classifier.
-
getRevision
public String getRevision()
- Specified by:
getRevision
in interfaceweka.core.RevisionHandler
- Overrides:
getRevision
in classweka.classifiers.AbstractClassifier
-
main
public static void main(String[] argv)
Main method for running this class.- Parameters:
argv
- the options
-
-