Main Page | Class List | File List | Class Members

RandomForest Class Reference

RandomForest class. Interface for growing random forests from training data or loading a random forest from disk.

#include <random_forest.h>

List of all members.

Public Member Functions

 RandomForest ()
 Empty constructor.

 RandomForest (const InstanceSet &set, int num_trees, int K, int max_depth)
 Constructor. (Build from training data).

int predict (const InstanceSet &set, int instance_no) const
 Method to predict the label.

float predict_prob (const InstanceSet &set, int instance_no, int label) const
 Predict probability of given label.

float testing_accuracy (const InstanceSet &testset) const
 Returns test accuracy of a labeled test set.

float training_accuracy () const
 Returns training accuracy.

float oob_accuracy () const
 Returns OOB accuracy (unbiased estimate of test accuracy).

void variable_importance (vector< pair< float, int > > *ranking, unsigned int *seed) const
 Variable importance ranking of features.

void read (istream &i)
 Load random forest.

void write (ostream &o)
 Save random forest.

void print () const
 Debug output.


Constructor & Destructor Documentation

RandomForest const InstanceSet set,
int  num_trees,
int  K,
int  max_depth
 

Parameters:
set training data
num_trees #trees to train
K #random vars to consider at each split
max_depth this param should be deprecated (depth is limited by number of instances)


The documentation for this class was generated from the following files:
Generated on Mon Jan 8 23:19:06 2007 for librf by doxygen 1.3.7