Java Doc for OLM.java in  » Science » weka » weka » classifiers » misc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » weka » weka.classifiers.misc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


weka.classifiers.RandomizableClassifier
   weka.classifiers.misc.OLM

OLM
public class OLM extends RandomizableClassifier implements TechnicalInformationHandler(Code)
This class is an implementation of the Ordinal Learning Method
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.

Lievens, Stijn (2003-2004). Studie en implementatie van instantie-gebaseerde algoritmen voor gesuperviseerd rangschikken..

BibTeX:

 @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}
 }
 @mastersthesis{Lievens2003-2004,
 author = {Lievens, Stijn},
 school = {Ghent University},
 title = {Studie en implementatie van instantie-gebaseerde algoritmen voor gesuperviseerd rangschikken.},
 year = {2003-2004}
 }
 

Valid options are:

 -S <num>
 Random number seed.
 (default 1)
 -D
 If set, classifier is run in debug mode and
 may output additional info to the console
 -C <CL|REG>
 Sets the classification type to be used.
 (Default: REG)
 -A <MEAN|MED|MAX>
 Sets the averaging type used in phase 1 of the classifier.
 (Default: MEAN)
 -N <NONE|EUCL|HAM>
 If different from NONE, a nearest neighbour rule is fired when the
 rule base doesn't contain an example smaller than the instance
 to be classified
 (Default: NONE).
 -E <MIN|MAX|BOTH>
 Sets the extension type, i.e. the rule base to use.
 (Default: MIN)
 -sort
 If set, the instances are also sorted within the same class
 before building the rule bases

author:
   Stijn Lievens (stijn.lievens@ugent.be)
version:
   $Revision: 1.1 $


Field Summary
final public static  intAT_MAXPROB
     Use the mode for averaging in phase 1.
final public static  intAT_MEAN
     Use the mean for averaging in phase 1.
final public static  intAT_MEDIAN
     Use the median for averaging in phase 1.
final public static  intCT_REAL
     No rounding is performed during classification, this is the classification is done in a regression like way.
final public static  intCT_ROUNDED
     Round the real value that is returned by the original algorithm to the nearest label.
final public static  intDT_EUCLID
     Use the Euclidian distance whenever a nearest neighbour rule is fired.
final public static  intDT_HAMMING
    
final public static  intDT_NONE
    
final public static  intET_BOTH
     Combine both the minimal and maximal extension, and use the midpoint of the resulting interval as prediction.
final public static  intET_MAX
     Use only the maximal extension.
final public static  intET_MIN
     Use only the minimal extension, as in the original algorithm of Ben-David.
final public static  Tag[]TAGS_AVERAGINGTYPES
    
final public static  Tag[]TAGS_CLASSIFICATIONTYPES
    
final public static  Tag[]TAGS_DISTANCETYPES
    
final public static  Tag[]TAGS_EXTENSIONTYPES
    


Method Summary
public  StringaveragingTypeTipText()
     Returns the tip text for this property.
public  voidbuildClassifier(Instances instances)
     Build the OLM classifier, meaning that the rule bases are built.
public  StringclassificationTypeTipText()
     Returns the tip text for this property.
public  doubleclassifyInstance(Instance instance)
     Classifies a given instance according to the current settings of the classifier.
public  StringdistanceTypeTipText()
     Returns the tip text for this property.
public  StringextensionTypeTipText()
     Returns the tip text for this property.
public  SelectedTaggetAveragingType()
     Gets the averaging type.
public  CapabilitiesgetCapabilities()
     Returns default capabilities of the classifier.
public  SelectedTaggetClassificationType()
     Gets the classification type.
public  SelectedTaggetDistanceType()
     Gets the distance type used by a nearest neighbour rule (if any).
public  SelectedTaggetExtensionType()
     Gets the extension type.
public  String[]getOptions()
     Gets an array of string with the current options of the classifier.
public  intgetSizeRuleBaseMax()
     Return the number of examples in the maximal rule base.
public  intgetSizeRuleBaseMin()
     Return the number of examples in the minimal rule base.
public  booleangetSort()
     Returns if the instances are sorted prior to building the rule bases.
public  TechnicalInformationgetTechnicalInformation()
     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.
public  StringglobalInfo()
     Returns a string describing the classifier.
public  EnumerationlistOptions()
     Get an enumeration of all available options for this classifier.
public static  voidmain(String[] args)
     Main method for testing this class.
public  StringseedTipText()
     Returns the tip text for this property.
public  voidsetAveragingType(SelectedTag value)
     Sets the averaging type to use in phase 1 of the algorithm.
public  voidsetClassificationType(SelectedTag value)
     Sets the classification type.
public  voidsetDistanceType(SelectedTag value)
     Sets the distance type to be used by a nearest neighbour rule (if any).
public  voidsetExtensionType(SelectedTag value)
     Sets the extension type to use. The minimal extension is the one used by Ben-David in the original algorithm.
public  voidsetOptions(String[] options)
     Parses the options for this object.
public  voidsetSort(boolean sort)
     Sets if the instances are to be sorted prior to building the rule bases.
public  StringsortTipText()
     Returns the tip text for this property.
public  StringtoString()
     Returns a string description of the classifier.

Field Detail
AT_MAXPROB
final public static int AT_MAXPROB(Code)
Use the mode for averaging in phase 1. The label that has maximum frequency is used. If there is more than one label that has maximum frequency, the lowest one is prefered.



AT_MEAN
final public static int AT_MEAN(Code)
Use the mean for averaging in phase 1. This is in fact a non ordinal procedure. The scores used for averaging are the internal values of WEKA.



AT_MEDIAN
final public static int AT_MEDIAN(Code)
Use the median for averaging in phase 1. The possible values are in the extended set of labels, this is labels in between the original labels are possible.



CT_REAL
final public static int CT_REAL(Code)
No rounding is performed during classification, this is the classification is done in a regression like way.



CT_ROUNDED
final public static int CT_ROUNDED(Code)
Round the real value that is returned by the original algorithm to the nearest label.



DT_EUCLID
final public static int DT_EUCLID(Code)
Use the Euclidian distance whenever a nearest neighbour rule is fired.



DT_HAMMING
final public static int DT_HAMMING(Code)
Use the Hamming distance, this is the number of positions in which the instances differ, whenever a nearest neighbour rule is fired



DT_NONE
final public static int DT_NONE(Code)
No nearest neighbour rule will be fired when classifying an instance for which there is no smaller rule in the rule base?



ET_BOTH
final public static int ET_BOTH(Code)
Combine both the minimal and maximal extension, and use the midpoint of the resulting interval as prediction.



ET_MAX
final public static int ET_MAX(Code)
Use only the maximal extension. In this case an algorithm dual to the original one is performed.



ET_MIN
final public static int ET_MIN(Code)
Use only the minimal extension, as in the original algorithm of Ben-David.



TAGS_AVERAGINGTYPES
final public static Tag[] TAGS_AVERAGINGTYPES(Code)
the averaging types



TAGS_CLASSIFICATIONTYPES
final public static Tag[] TAGS_CLASSIFICATIONTYPES(Code)
the classification types



TAGS_DISTANCETYPES
final public static Tag[] TAGS_DISTANCETYPES(Code)
the distance types



TAGS_EXTENSIONTYPES
final public static Tag[] TAGS_EXTENSIONTYPES(Code)
the mode types





Method Detail
averagingTypeTipText
public String averagingTypeTipText()(Code)
Returns the tip text for this property. tip text for this property suitable for displaying in the explorer/experimenter gui



buildClassifier
public void buildClassifier(Instances instances) throws Exception(Code)
Build the OLM classifier, meaning that the rule bases are built.
Parameters:
  instances - the instances to use for building the rule base
throws:
  Exception - if instances cannot be handled bythe classifier.



classificationTypeTipText
public String classificationTypeTipText()(Code)
Returns the tip text for this property. tip text for this property suitable for displaying in the explorer/experimenter gui



classifyInstance
public double classifyInstance(Instance instance)(Code)
Classifies a given instance according to the current settings of the classifier.
Parameters:
  instance - the instance to be classified a double that represents the classification,this could either be the internal value of a label, when rounding is on, or a real number.



distanceTypeTipText
public String distanceTypeTipText()(Code)
Returns the tip text for this property. tip text for this property suitable for displaying in the explorer/experimenter gui



extensionTypeTipText
public String extensionTypeTipText()(Code)
Returns the tip text for this property. tip text for this property suitable for displaying in the explorer/experimenter gui



getAveragingType
public SelectedTag getAveragingType()(Code)
Gets the averaging type. the averaging type



getCapabilities
public Capabilities getCapabilities()(Code)
Returns default capabilities of the classifier. the capabilities of this classifier



getClassificationType
public SelectedTag getClassificationType()(Code)
Gets the classification type. the classification type



getDistanceType
public SelectedTag getDistanceType()(Code)
Gets the distance type used by a nearest neighbour rule (if any). the distance type



getExtensionType
public SelectedTag getExtensionType()(Code)
Gets the extension type. the extension type



getOptions
public String[] getOptions()(Code)
Gets an array of string with the current options of the classifier. an array suitable as argument for setOptions



getSizeRuleBaseMax
public int getSizeRuleBaseMax()(Code)
Return the number of examples in the maximal rule base. The maximal rule base is built using an algorithm dual to that for building the minimal rule base. the number of examples in the maximal rule base



getSizeRuleBaseMin
public int getSizeRuleBaseMin()(Code)
Return the number of examples in the minimal rule base. The minimal rule base is the one that corresponds to the rule base of Ben-David. the number of examples in the minimal rule base



getSort
public boolean getSort()(Code)
Returns if the instances are sorted prior to building the rule bases. true if instances are sorted prior to buildingthe rule bases, false otherwise.



getTechnicalInformation
public TechnicalInformation getTechnicalInformation()(Code)
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. the technical information about this class



globalInfo
public String globalInfo()(Code)
Returns a string describing the classifier. a description suitable for displaying in the explorer/experimenter gui



listOptions
public Enumeration listOptions()(Code)
Get an enumeration of all available options for this classifier. an enumeration of available options



main
public static void main(String[] args)(Code)
Main method for testing this class.
Parameters:
  args - the command line arguments



seedTipText
public String seedTipText()(Code)
Returns the tip text for this property. tip text for this property suitable for displaying in the explorer/experimenter gui



setAveragingType
public void setAveragingType(SelectedTag value)(Code)
Sets the averaging type to use in phase 1 of the algorithm.
Parameters:
  value - the averaging type to use



setClassificationType
public void setClassificationType(SelectedTag value)(Code)
Sets the classification type.
Parameters:
  value - the classification type to be set.



setDistanceType
public void setDistanceType(SelectedTag value)(Code)
Sets the distance type to be used by a nearest neighbour rule (if any).
Parameters:
  value - the distance type to use



setExtensionType
public void setExtensionType(SelectedTag value)(Code)
Sets the extension type to use. The minimal extension is the one used by Ben-David in the original algorithm. The maximal extension is a completely dual variant of the minimal extension. When using both, then the midpoint of the interval determined by both extensions is returned.
Parameters:
  value - the extension type to use



setOptions
public void setOptions(String[] options) throws Exception(Code)
Parses the options for this object.

Valid options are:

 -S <num>
 Random number seed.
 (default 1)
 -D
 If set, classifier is run in debug mode and
 may output additional info to the console
 -C <CL|REG>
 Sets the classification type to be used.
 (Default: REG)
 -A <MEAN|MED|MAX>
 Sets the averaging type used in phase 1 of the classifier.
 (Default: MEAN)
 -N <NONE|EUCL|HAM>
 If different from NONE, a nearest neighbour rule is fired when the
 rule base doesn't contain an example smaller than the instance
 to be classified
 (Default: NONE).
 -E <MIN|MAX|BOTH>
 Sets the extension type, i.e. the rule base to use.
 (Default: MIN)
 -sort
 If set, the instances are also sorted within the same class
 before building the rule bases

Parameters:
  options - an array of strings containing the options
throws:
  Exception - if there are options that have invalid arguments.



setSort
public void setSort(boolean sort)(Code)
Sets if the instances are to be sorted prior to building the rule bases.
Parameters:
  sort - if true the instances will be sorted



sortTipText
public String sortTipText()(Code)
Returns the tip text for this property. tip text for this property suitable for displaying in the explorer/experimenter gui



toString
public String toString()(Code)
Returns a string description of the classifier. In debug mode, the rule bases are added to the string representation as well. This means that the description can become rather lengthy. a String describing the classifier.



Fields inherited from weka.classifiers.RandomizableClassifier
protected int m_Seed(Code)(Java Doc)

Methods inherited from weka.classifiers.RandomizableClassifier
public String[] getOptions()(Code)(Java Doc)
public int getSeed()(Code)(Java Doc)
public Enumeration listOptions()(Code)(Java Doc)
public String seedTipText()(Code)(Java Doc)
public void setOptions(String[] options) throws Exception(Code)(Java Doc)
public void setSeed(int seed)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.