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


java.lang.Object
   weka.classifiers.Classifier
      weka.classifiers.trees.RandomForest

RandomForest
public class RandomForest extends Classifier implements OptionHandler,Randomizable,WeightedInstancesHandler,AdditionalMeasureProducer,TechnicalInformationHandler(Code)
Class for constructing a forest of random trees.

For more information see:

Leo Breiman (2001). Random Forests. Machine Learning. 45(1):5-32.

BibTeX:

 @article{Breiman2001,
 author = {Leo Breiman},
 journal = {Machine Learning},
 number = {1},
 pages = {5-32},
 title = {Random Forests},
 volume = {45},
 year = {2001}
 }
 

Valid options are:

 -I <number of trees>
 Number of trees to build.
 -K <number of features>
 Number of features to consider (<1=int(logM+1)).
 -S
 Seed for random number generator.
 (default 1)
 -depth <num>
 The maximum depth of the trees, 0 for unlimited.
 (default 0)
 -D
 If set, classifier is run in debug mode and
 may output additional info to the console

author:
   Richard Kirkby (rkirkby@cs.waikato.ac.nz)
version:
   $Revision: 1.12 $


Field Summary
protected  intm_KValue
     Final number of features that were considered in last build.
protected  intm_MaxDepth
    
protected  Baggingm_bagger
     The bagger.
protected  intm_numFeatures
     Number of features to consider in random feature selection.
protected  intm_numTrees
     Number of trees in forest.
protected  intm_randomSeed
     The random seed.
final static  longserialVersionUID
    


Method Summary
public  voidbuildClassifier(Instances data)
     Builds a classifier for a set of instances.
public  double[]distributionForInstance(Instance instance)
     Returns the class probability distribution for an instance.
public  EnumerationenumerateMeasures()
     Returns an enumeration of the additional measure names.
public  CapabilitiesgetCapabilities()
     Returns default capabilities of the classifier.
public  intgetMaxDepth()
     Get the maximum depth of trh tree, 0 for unlimited.
public  doublegetMeasure(String additionalMeasureName)
     Returns the value of the named measure.
public  intgetNumFeatures()
     Get the number of features used in random selection.
public  intgetNumTrees()
     Get the value of numTrees.
public  String[]getOptions()
     Gets the current settings of the forest.
public  intgetSeed()
    
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[] argv)
     Main method for this class.
public  StringmaxDepthTipText()
    
public  doublemeasureOutOfBagError()
     Gets the out of bag error that was calculated as the classifier was built.
public  StringnumFeaturesTipText()
    
public  StringnumTreesTipText()
    
public  StringseedTipText()
    
public  voidsetMaxDepth(int value)
     Set the maximum depth of the tree, 0 for unlimited.
public  voidsetNumFeatures(int newNumFeatures)
     Set the number of features to use in random selection.
public  voidsetNumTrees(int newNumTrees)
     Set the value of numTrees.
public  voidsetOptions(String[] options)
     Parses a given list of options.
public  voidsetSeed(int seed)
     Set the seed for random number generation.
public  StringtoString()
     Outputs a description of this classifier.

Field Detail
m_KValue
protected int m_KValue(Code)
Final number of features that were considered in last build.



m_MaxDepth
protected int m_MaxDepth(Code)
The maximum depth of the trees (0 = unlimited)



m_bagger
protected Bagging m_bagger(Code)
The bagger.



m_numFeatures
protected int m_numFeatures(Code)
Number of features to consider in random feature selection. If less than 1 will use int(logM+1) )



m_numTrees
protected int m_numTrees(Code)
Number of trees in forest.



m_randomSeed
protected int m_randomSeed(Code)
The random seed.



serialVersionUID
final static long serialVersionUID(Code)
for serialization





Method Detail
buildClassifier
public void buildClassifier(Instances data) throws Exception(Code)
Builds a classifier for a set of instances.
Parameters:
  data - the instances to train the classifier with
throws:
  Exception - if something goes wrong



distributionForInstance
public double[] distributionForInstance(Instance instance) throws Exception(Code)
Returns the class probability distribution for an instance.
Parameters:
  instance - the instance to be classified the distribution the forest generates for the instance
throws:
  Exception - if computation fails



enumerateMeasures
public Enumeration enumerateMeasures()(Code)
Returns an enumeration of the additional measure names. an enumeration of the measure names



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



getMaxDepth
public int getMaxDepth()(Code)
Get the maximum depth of trh tree, 0 for unlimited. the maximum depth.



getMeasure
public double getMeasure(String additionalMeasureName)(Code)
Returns the value of the named measure.
Parameters:
  additionalMeasureName - the name of the measure to query for its value the value of the named measure
throws:
  IllegalArgumentException - if the named measure is not supported



getNumFeatures
public int getNumFeatures()(Code)
Get the number of features used in random selection. Value of numFeatures.



getNumTrees
public int getNumTrees()(Code)
Get the value of numTrees. Value of numTrees.



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



getSeed
public int getSeed()(Code)
Gets the seed for the random number generations the seed for the random number generation



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[] argv)(Code)
Main method for this class.
Parameters:
  argv - the options



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



measureOutOfBagError
public double measureOutOfBagError()(Code)
Gets the out of bag error that was calculated as the classifier was built. the out of bag error



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



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



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



setMaxDepth
public void setMaxDepth(int value)(Code)
Set the maximum depth of the tree, 0 for unlimited.
Parameters:
  value - the maximum depth.



setNumFeatures
public void setNumFeatures(int newNumFeatures)(Code)
Set the number of features to use in random selection.
Parameters:
  newNumFeatures - Value to assign to numFeatures.



setNumTrees
public void setNumTrees(int newNumTrees)(Code)
Set the value of numTrees.
Parameters:
  newNumTrees - Value to assign to numTrees.



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

Valid options are:

 -I <number of trees>
 Number of trees to build.
 -K <number of features>
 Number of features to consider (<1=int(logM+1)).
 -S
 Seed for random number generator.
 (default 1)
 -depth <num>
 The maximum depth of the trees, 0 for unlimited.
 (default 0)
 -D
 If set, classifier is run in debug mode and
 may output additional info to the console

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



setSeed
public void setSeed(int seed)(Code)
Set the seed for random number generation.
Parameters:
  seed - the seed



toString
public String toString()(Code)
Outputs a description of this classifier. a string containing a description of the classifier



Fields inherited from weka.classifiers.Classifier
protected boolean m_Debug(Code)(Java Doc)

Methods inherited from weka.classifiers.Classifier
abstract public void buildClassifier(Instances data) throws Exception(Code)(Java Doc)
public double classifyInstance(Instance instance) throws Exception(Code)(Java Doc)
public String debugTipText()(Code)(Java Doc)
public double[] distributionForInstance(Instance instance) throws Exception(Code)(Java Doc)
public static Classifier forName(String classifierName, String[] options) throws Exception(Code)(Java Doc)
public Capabilities getCapabilities()(Code)(Java Doc)
public boolean getDebug()(Code)(Java Doc)
public String[] getOptions()(Code)(Java Doc)
public Enumeration listOptions()(Code)(Java Doc)
public static Classifier[] makeCopies(Classifier model, int num) throws Exception(Code)(Java Doc)
public static Classifier makeCopy(Classifier model) throws Exception(Code)(Java Doc)
protected static void runClassifier(Classifier classifier, String[] options)(Code)(Java Doc)
public void setDebug(boolean debug)(Code)(Java Doc)
public void setOptions(String[] options) throws Exception(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.