public class Ridor extends Classifier implements AdditionalMeasureProducer, WeightedInstancesHandler
Valid options are:
-F <number of folds> Set number of folds for IREP One fold is used as pruning set. (default 3)
-S <number of shuffles> Set number of shuffles to randomize the data in order to get better rule. (default 10)
-A Set flag of whether use the error rate of all the data to select the default class in each step. If not set, the learner will only use the error rate in the pruning data
-M Set flag of whether use the majority class as the default class in each step instead of choosing default class based on the error rate (if the flag is not set)
-N <min. weights> Set the minimal weights of instances within a split. (default 2.0)
Constructor and Description |
---|
Ridor() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances instances)
Builds a ripple-down manner rule learner.
|
double |
classifyInstance(Instance datum)
Classify the test instance with the rule learner
|
Enumeration |
enumerateMeasures()
Returns an enumeration of the additional measure names
|
String |
foldsTipText()
Returns the tip text for this property
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
int |
getFolds() |
boolean |
getMajorityClass() |
double |
getMeasure(String additionalMeasureName)
Returns the value of the named measure
|
double |
getMinNo() |
String[] |
getOptions()
Gets the current settings of the Classifier.
|
String |
getRevision()
Returns the revision string.
|
int |
getSeed() |
int |
getShuffle() |
boolean |
getWholeDataErr() |
String |
globalInfo()
Returns a string describing classifier
|
Enumeration |
listOptions()
Returns an enumeration describing the available options
Valid options are:
|
static void |
main(String[] args)
Main method.
|
String |
majorityClassTipText()
Returns the tip text for this property
|
String |
minNoTipText()
Returns the tip text for this property
|
String |
seedTipText()
Returns the tip text for this property
|
void |
setFolds(int fold) |
void |
setMajorityClass(boolean m) |
void |
setMinNo(double m) |
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
setSeed(int s) |
void |
setShuffle(int sh) |
void |
setWholeDataErr(boolean a) |
String |
shuffleTipText()
Returns the tip text for this property
|
String |
toString()
Prints the all the rules of the rule learner.
|
String |
wholeDataErrTipText()
Returns the tip text for this property
|
debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, setDebug
public String globalInfo()
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Classifier
Capabilities
public void buildClassifier(Instances instances) throws Exception
buildClassifier
in class Classifier
instances
- the training dataException
- if classifier can't be built successfullypublic double classifyInstance(Instance datum)
classifyInstance
in class Classifier
datum
- the instance to be classifiedpublic Enumeration listOptions()
-F number
Set number of folds for reduced error pruning. One fold is
used as the pruning set. (Default: 3)
-S number
Set number of shuffles for randomization. (Default: 10)
-A
Set flag of whether use the error rate of all the data to select
the default class in each step. If not set, the learner will only use
the error rate in the pruning data
-M
Set flag of whether use the majority class as the default class
in each step instead of choosing default class based on the error rate
(if the flag is not set)
-N number
Set the minimal weights of instances within a split.
(Default: 2)
listOptions
in interface OptionHandler
listOptions
in class Classifier
public void setOptions(String[] options) throws Exception
-F <number of folds> Set number of folds for IREP One fold is used as pruning set. (default 3)
-S <number of shuffles> Set number of shuffles to randomize the data in order to get better rule. (default 10)
-A Set flag of whether use the error rate of all the data to select the default class in each step. If not set, the learner will only use the error rate in the pruning data
-M Set flag of whether use the majority class as the default class in each step instead of choosing default class based on the error rate (if the flag is not set)
-N <min. weights> Set the minimal weights of instances within a split. (default 2.0)
setOptions
in interface OptionHandler
setOptions
in class Classifier
options
- the list of options as an array of stringsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class Classifier
public String foldsTipText()
public void setFolds(int fold)
public int getFolds()
public String shuffleTipText()
public void setShuffle(int sh)
public int getShuffle()
public String seedTipText()
public void setSeed(int s)
public int getSeed()
public String wholeDataErrTipText()
public void setWholeDataErr(boolean a)
public boolean getWholeDataErr()
public String majorityClassTipText()
public void setMajorityClass(boolean m)
public boolean getMajorityClass()
public String minNoTipText()
public void setMinNo(double m)
public double getMinNo()
public Enumeration enumerateMeasures()
enumerateMeasures
in interface AdditionalMeasureProducer
public double getMeasure(String additionalMeasureName)
getMeasure
in interface AdditionalMeasureProducer
additionalMeasureName
- the name of the measure to query for its valueIllegalArgumentException
- if the named measure is not supportedpublic String toString()
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Classifier
public static void main(String[] args)
args
- the options for the classifierCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.