Random Forest Learner

This Node Is Deprecated — This version of the node has been replaced with a new and improved version. The old version is kept for backwards-compatibility, but for all new workflows we suggest to use the version linked below.
Go to Suggested ReplacementRandom Forest Learner

Learns a random forest*, which consists of a chosen number of decision trees. Each of the decision tree models is learned on a different set of rows (records) and a different set of columns (describing attributes), whereby the latter can also be a bit-vector or byte-vector descriptor (e.g. molecular fingerprint). The row sets for each decision tree are created by bootstrapping and have the same size as the original input table. For each node of a decision tree a new set of attributes is determined by taking a random sample of size sqrt(m) where m is the total number of attributes. The output model describes a random forest and is applied in the corresponding predictor node using a simply majority vote.

This node provides a subset of the functionality of the Tree Ensemble Learner corresponding to a random forest. If you need additional functionality please check out the Tree Ensemble Learner.

Experiments have shown the results on different data sets are very similar to the random Forest implementation available in R. Known differences are in the missing value handling (currently not available in this node) and the split creation for nominal attributes (the original random forest classifier uses binary nominal splits; this implementation creates child nodes for each possible split attribute).

The decision tree construction takes place in main memory (all data and all models are kept in memory).

(*) RANDOM FORESTS is a registered trademark of Minitab, LLC and is used with Minitab’s permission.


Attribute Selection

Target Column
Select the column containing the value to be learned. Rows with missing values in this column will be ignored during the learning process.
Attribute Selection

Select the attributes to use learn the model. Two variants are possible.

Fingerprint attribute uses the different bit/byte positions in the selected bit/byte vector as learning attributes (for instance a bit vector of length 1024 is expanded to 1024 binary attributes or 1024 long byte vector is expanded to the corresponding number of numeric attributes). All vectors in the selected column must have the same length.

Column attributes are nominal and numeric columns used as descriptors. Numeric columns are split in a <= fashion; nominal columns are currently split by creating child nodes for each of the values.

Enable Hightlighting (#patterns to store)
If selected, the node stores the selected number of rows and allows highlighting them in the node view.
Save target distribution in tree nodes (memory expensive - only important for tree view and PMML export)
If selected, the model will store the distribution of the target category values in each tree node. This information is not relevant for the prediction but is accessible via the tree view or when exporting individual models to PMML. Enabling this option may increase memory consumption considerably.

Tree Options

Split Criterion
Choose the split criterion here. Gini is usually a good choice and is used in "Classification and Regression Trees" (Breiman et al, 1984) and the original random forest algorithm (as described by Breiman et al, 2001); information gain is used in C4.5; information gain ratio normalizes the standard information gain by the split entropy to overcome some unfair preference for nominal splits with many child nodes.
Limit number of levels (tree depth)
Number of tree levels to be learned. For instance, a value of 1 would only split the (single) root node (decision stump).
Minimum node size
Minimum number of records in child nodes. It can be at most half of the minimum split node size (see above). Note, this parameter is currently ignored for nominal splits.

Forest Options

Number of models
The number of decision trees to learn. A "reasonable" value can range from very few (say 10) to many thousands for small data sets with few target category values.
Use static random seed
Choose a seed to get reproducible results.

Input Ports

The data to learn from. It must contain at least one nominal target column and either a fingerprint (bit-vector/byte-vector) column or another numeric or nominal column.

Output Ports

The input data with the out-of-bag error estimates, i.e. for each input row the majority vote of all models that did not use the row in the training. If the entire data was used to train the individual models then this output will contain the input data with missing prediction and confidence values. The appended columns are equivalent to the columns appended by the corresponding predictor node. There is one additional column model count, which contains the number of models used for the voting (number of models not using the row throughout the learning.)
A statistics table on the attributes used in the different tree learners. Each row represents one training attribute with these statistics: #splits (level x) as the number of models, which use the attribute as split on level x (with level 0 as root split); #candidates (level x) is the number of times an attribute was in the attribute sample for level x (in a random forest setup these samples differ from node to node). If no attribute sampling is used #candidates is the number of models. Note, these numbers are uncorrected, i.e. if an attribute is selected on level 0 but is also in the candidate set of level 1 (but will not be split on level 1 because it has been split one level up), the #candidate number will still count the attribute as candidate.
The trained model.


Tree Views
An decision tree viewer for all the trained models. Use the spinner to iterate through the different models.




You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.