|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.rules.OLM
public class OLM
This class is an implementation of the Ordinal Learning Method (OLM).
Further information regarding the algorithm and variants can be found in:
Arie Ben-David (1992). Automatic Generation of Symbolic Multiattribute Ordinal Knowledge-Based DSSs: methodology and Applications. Decision Sciences. 23:1357-1372.
@article{Ben-David1992, author = {Arie Ben-David}, journal = {Decision Sciences}, pages = {1357-1372}, title = {Automatic Generation of Symbolic Multiattribute Ordinal Knowledge-Based DSSs: methodology and Applications}, volume = {23}, year = {1992} }Valid options are:
-R <integer> The resolution mode. Valid values are: 0 for conservative resolution, 1 for random resolution, 2 for average, and 3 for no resolution. (default 0).
-C <integer> The classification mode. Valid values are: 0 for conservative classification, 1 for nearest neighbour classification. (default 0).
-U <size> SSet maximum size of rule base (default: -U <number of examples>)
Field Summary | |
---|---|
static int |
CLASSIFICATION_CONSERVATIVE
|
static int |
CLASSIFICATION_NEARESTNEIGHBOUR
|
static int |
RESOLUTION_AVERAGE
|
static int |
RESOLUTION_CONSERVATIVE
|
static int |
RESOLUTION_NONE
|
static int |
RESOLUTION_RANDOM
|
static Tag[] |
TAGS_CLASSIFICATION
|
static Tag[] |
TAGS_RESOLUTION
|
Constructor Summary | |
---|---|
OLM()
|
Method Summary | |
---|---|
void |
buildClassifier(Instances data)
Generates the classifier. |
java.lang.String |
classificationModeTipText()
Returns the tip text for this property |
double |
classifyInstance(Instance inst)
Classifies a given instance. |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
SelectedTag |
getClassificationMode()
Gets the classification mode. |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier. |
SelectedTag |
getResolutionMode()
Gets the resolution mode. |
java.lang.String |
getRevision()
Returns the revision string. |
int |
getRuleSize()
|
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. |
java.lang.String |
globalInfo()
Returns a string describing the classifier. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options Valid options are: |
static void |
main(java.lang.String[] args)
Main method for testing this class |
java.lang.String |
resolutionModeTipText()
Returns the tip text for this property |
java.lang.String |
ruleSizeTipText()
Returns the tip text for this property |
void |
setClassificationMode(SelectedTag newMethod)
Sets the classification mode. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setResolutionMode(SelectedTag newMethod)
Sets the resolution mode. |
void |
setRuleSize(int s)
|
java.lang.String |
toString()
Prints a description of the classifier. |
Methods inherited from class weka.classifiers.AbstractClassifier |
---|
debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, setDebug |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int RESOLUTION_NONE
public static final int RESOLUTION_AVERAGE
public static final int RESOLUTION_RANDOM
public static final int RESOLUTION_CONSERVATIVE
public static final Tag[] TAGS_RESOLUTION
public static final int CLASSIFICATION_CONSERVATIVE
public static final int CLASSIFICATION_NEARESTNEIGHBOUR
public static final Tag[] TAGS_CLASSIFICATION
Constructor Detail |
---|
public OLM()
Method Detail |
---|
public Capabilities getCapabilities()
getCapabilities
in interface Classifier
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class AbstractClassifier
Capabilities
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public double classifyInstance(Instance inst)
classifyInstance
in interface Classifier
classifyInstance
in class AbstractClassifier
inst
- the instance to be classified
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class AbstractClassifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-R <integer> The resolution mode. Valid values are: 0 for conservative resolution, 1 for random resolution, 2 for average, and 3 for no resolution. (default 0).
-C <integer> The classification mode. Valid values are: 0 for conservative classification, 1 for nearest neighbour classification. (default 0).
-U <size> SSet maximum size of rule base (default: -U <number of examples>)
setOptions
in interface OptionHandler
setOptions
in class AbstractClassifier
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class AbstractClassifier
public java.lang.String resolutionModeTipText()
public void setResolutionMode(SelectedTag newMethod)
newMethod
- the new evaluation mode.public SelectedTag getResolutionMode()
public void setClassificationMode(SelectedTag newMethod)
newMethod
- the new classification mode.public SelectedTag getClassificationMode()
public java.lang.String classificationModeTipText()
public java.lang.String ruleSizeTipText()
public int getRuleSize()
public void setRuleSize(int s)
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in interface Classifier
data
- the data to be used
java.lang.Exception
- if the classifier can't built successfullypublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractClassifier
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |