Description Usage Arguments Value Author(s) Examples

View source: R/ForestDisc_functions.R

Learn decision splits from random forest algorithm. The resulting model consists of a set of trees where each tree is a collection of rules, and each rule is a combination of decision splits (pairs of variable/value(s)) defined from a root node to a terminal node.

1 | ```
RF2Selectedtrees (X,Y,ntree,max_TreeRules = 'default',min_RuleSupport = 'default')
``` |

`X` |
Descriptive attributes data frame. |

`Y` |
Target attribute (A response vector). |

`ntree` |
Number of trees to grow using Random Forest algorithm. |

`max_TreeRules` |
The maximum number of rules in each tree. It represents the maximum number of terminal nodes in each tree grown by random forest. The default value is the one set in random forest algorithm. |

`min_RuleSupport` |
The minimum support related to each rule (defined from a root node to a leef node). The support of a rule represents the size of its terminal node divided by the number of instances in the data. The default value used is the minimum size of terminal node set in random forest algorithm divided by the number of instances in the data. |

List with components:

`ntree ` |
Number of trees. |

`list ` |
List of 'ntree' matrix where each one corresponds to a tree grown by random forest algorithm. Each matrix consists of six columns and number of rows equal to the number of nodes in the tree. (more details can be found in the documentation of the function 'getTree' from “randomForest” package) |

`RF ` |
The original call to randomForest algorithm used. |

`xlevels ` |
vector of lists of size equal to the number of predictors. Each list corresponds to an attribute. In the case of categorical attribute, the categories are returned. In the case of continuous attribute, the distinct splits values performed by random Forest are returned. |

`continuous_var ` |
Vector of continuous predictors. |

`categorical_var ` |
Vector of categorical predictors. |

Haddouchi Maïssae

1 2 3 4 5 6 7 8 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.