Java Doc for RandomSubSpace.java in  » Science » weka » weka » classifiers » meta » 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.meta 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


weka.classifiers.RandomizableIteratedSingleClassifierEnhancer
   weka.classifiers.meta.RandomSubSpace

RandomSubSpace
public class RandomSubSpace extends RandomizableIteratedSingleClassifierEnhancer implements WeightedInstancesHandler,TechnicalInformationHandler(Code)
This method constructs a decision tree based classifier that maintains highest accuracy on training data and improves on generalization accuracy as it grows in complexity. The classifier consists of multiple trees constructed systematically by pseudorandomly selecting subsets of components of the feature vector, that is, trees constructed in randomly chosen subspaces.

For more information, see

Tin Kam Ho (1998). The Random Subspace Method for Constructing Decision Forests. IEEE Transactions on Pattern Analysis and Machine Intelligence. 20(8):832-844. URL http://citeseer.ist.psu.edu/ho98random.html.

BibTeX:

 @article{Ho1998,
 author = {Tin Kam Ho},
 journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
 number = {8},
 pages = {832-844},
 title = {The Random Subspace Method for Constructing Decision Forests},
 volume = {20},
 year = {1998},
 ISSN = {0162-8828},
 URL = {http://citeseer.ist.psu.edu/ho98random.html}
 }
 

Valid options are:

 -P
 Size of each subspace:
 < 1: percentage of the number of attributes
 >=1: absolute number of attributes
 
 -S <num>
 Random number seed.
 (default 1)
 -I <num>
 Number of iterations.
 (default 10)
 -D
 If set, classifier is run in debug mode and
 may output additional info to the console
 -W
 Full name of base classifier.
 (default: weka.classifiers.trees.REPTree)
 
 Options specific to classifier weka.classifiers.trees.REPTree:
 
 -M <minimum number of instances>
 Set minimum number of instances per leaf (default 2).
 -V <minimum variance for split>
 Set minimum numeric class variance proportion
 of train variance for split (default 1e-3).
 -N <number of folds>
 Number of folds for reduced error pruning (default 3).
 -S <seed>
 Seed for random data shuffling (default 1).
 -P
 No pruning.
 -L
 Maximum tree depth (default -1, no maximum)
Options after -- are passed to the designated classifier.


author:
   Bernhard Pfahringer (bernhard@cs.waikato.ac.nz)
author:
   Peter Reutemann (fracpete@cs.waikato.ac.nz)
version:
   $Revision: 1.3 $



Field Summary
protected  doublem_SubSpaceSize
    
protected  Classifierm_ZeroR
    

Constructor Summary
public  RandomSubSpace()
     Constructor.

Method Summary
public  voidbuildClassifier(Instances data)
     builds the classifier.
protected  StringdefaultClassifierString()
     String describing default classifier.
public  double[]distributionForInstance(Instance instance)
     Calculates the class membership probabilities for the given test instance.
public  String[]getOptions()
     Gets the current settings of the Classifier.
public  doublegetSubSpaceSize()
     Gets the size of each subSpace, as a percentage of the training set size.
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()
    
public  EnumerationlistOptions()
     Returns an enumeration describing the available options.
public static  voidmain(String[] args)
     Main method for testing this class.
protected  intnumberOfAttributes(int total, double fraction)
    
protected  StringrandomSubSpace(Integer[] indices, int subSpaceSize, int classIndex, Random random)
     generates an index string describing a random subspace, suitable for the Remove filter.
public  voidsetOptions(String[] options)
     Parses a given list of options.
public  voidsetSubSpaceSize(double value)
     Sets the size of each subSpace, as a percentage of the training set size.
public  StringsubSpaceSizeTipText()
    
public  StringtoString()
     Returns description of the bagged classifier.

Field Detail
m_SubSpaceSize
protected double m_SubSpaceSize(Code)
The size of each bag sample, as a percentage of the training size



m_ZeroR
protected Classifier m_ZeroR(Code)
a ZeroR model in case no model can be built from the data




Constructor Detail
RandomSubSpace
public RandomSubSpace()(Code)
Constructor.




Method Detail
buildClassifier
public void buildClassifier(Instances data) throws Exception(Code)
builds the classifier.
Parameters:
  data - the training data to be used for generating theclassifier.
throws:
  Exception - if the classifier could not be built successfully



defaultClassifierString
protected String defaultClassifierString()(Code)
String describing default classifier. the default classifier classname



distributionForInstance
public double[] distributionForInstance(Instance instance) throws Exception(Code)
Calculates the class membership probabilities for the given test instance.
Parameters:
  instance - the instance to be classified preedicted class probability distribution
throws:
  Exception - if distribution can't be computed successfully



getOptions
public String[] getOptions()(Code)
Gets the current settings of the Classifier. an array of strings suitable for passing to setOptions



getSubSpaceSize
public double getSubSpaceSize()(Code)
Gets the size of each subSpace, as a percentage of the training set size. the subSpace size, as a percentage.



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 classifier a description suitable fordisplaying in the explorer/experimenter gui



listOptions
public Enumeration listOptions()(Code)
Returns an enumeration describing the available options. an enumeration of all the available options.



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



numberOfAttributes
protected int numberOfAttributes(int total, double fraction)(Code)
calculates the number of attributes
Parameters:
  total - the available number of attributes
Parameters:
  fraction - the fraction - if less than 1 it represents thepercentage, otherwise the absolute number of attributes the number of attributes to use



randomSubSpace
protected String randomSubSpace(Integer[] indices, int subSpaceSize, int classIndex, Random random)(Code)
generates an index string describing a random subspace, suitable for the Remove filter.
Parameters:
  indices - the attribute indices
Parameters:
  subSpaceSize - the size of the subspace
Parameters:
  classIndex - the class index
Parameters:
  random - the random number generator the generated string describing the subspace



setOptions
public void setOptions(String[] options) throws Exception(Code)
Parses a given list of options.

Valid options are:

 -P
 Size of each subspace:
 < 1: percentage of the number of attributes
 >=1: absolute number of attributes
 
 -S <num>
 Random number seed.
 (default 1)
 -I <num>
 Number of iterations.
 (default 10)
 -D
 If set, classifier is run in debug mode and
 may output additional info to the console
 -W
 Full name of base classifier.
 (default: weka.classifiers.trees.REPTree)
 
 Options specific to classifier weka.classifiers.trees.REPTree:
 
 -M <minimum number of instances>
 Set minimum number of instances per leaf (default 2).
 -V <minimum variance for split>
 Set minimum numeric class variance proportion
 of train variance for split (default 1e-3).
 -N <number of folds>
 Number of folds for reduced error pruning (default 3).
 -S <seed>
 Seed for random data shuffling (default 1).
 -P
 No pruning.
 -L
 Maximum tree depth (default -1, no maximum)
Options after -- are passed to the designated classifier.


Parameters:
  options - the list of options as an array of strings
throws:
  Exception - if an option is not supported




setSubSpaceSize
public void setSubSpaceSize(double value)(Code)
Sets the size of each subSpace, as a percentage of the training set size.
Parameters:
  value - the subSpace size, as a percentage.



subSpaceSizeTipText
public String subSpaceSizeTipText()(Code)
Returns the tip text for this property tip text for this property suitable fordisplaying in the explorer/experimenter gui



toString
public String toString()(Code)
Returns description of the bagged classifier. description of the bagged classifier as a string



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

Methods inherited from weka.classifiers.RandomizableIteratedSingleClassifierEnhancer
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.