Pruning decision trees

Pruning means to change the model by deleting the child nodes of a branch node. The pruned node is regarded as a leaf node. Leaf nodes cannot be pruned.
A decision tree consists of a root node, several branch nodes, and several leaf nodes.

The color of the pruned nodes is a shade brighter than the color of unpruned nodes, and the decision next to the pruned nodes is represented in italics. In contrast to collapsing nodes to hide them from the view, pruning actually changes the model.

You can manually prune the nodes of the tree by selecting the check box in the Pruned column. When the node is pruned, the lower levels of the node are collapsed. If you expand a collapsed node by clicking on the node icon, the collapsed nodes are displayed.

You can specify the prune level. The prune level determines that all nodes with a level smaller than the specified prune level are unpruned, and all nodes with a level equal or greater than the specified prune level are pruned. For example, if you specify a prune level of 3, all nodes with level 1 and 2 are unpruned, and all nodes with level 3 or greater are pruned.

The computed prune level is the original prune state of the tree classification model. This means that some of the branch nodes might be pruned by the Tree Classification mining function, or none of the branch nodes might be pruned at all. Resetting to the computed prune level removes the manual pruning that you might ever have done to the tree classification model.

Pruning selected nodes
To prune nodes, you can do one of the following actions:
  • Select the check box in the Pruned column of the nodes that you want to prune.
  • Select the nodes that you want to prune and click Selected => Prune Nodes.
  • Right-click in the row of the node that you want to prune and select Prune Nodes from the pop-up menu.
Unpruning selected nodes
To unprune nodes, you can choose between the following options:
  • Deselect the check box in the Pruned column of the nodes that you want to unprune.
  • Click in a row and click Selected => Unprune Nodes.
  • Right-click in the row of the node that you want to unprune and select Unprune Nodes from the pop-up menu.
Setting prune level

To set the prune level, select View => Set Prune Level. Click the list button in the Set Prune Level pop-up window and select one of the available prune levels.

You can also set the prune level by selecting a prune level from the list of available prune levels on the tool bar.

Resetting to computed prune level
To reset the model to the computed prune level, click View => Reset To Computed Prune Level.


Feedback | Information roadmap