Description Usage Arguments Value Author(s) See Also

View source: R/pretty.gbm.tree.R

`gbm`

stores the collection of trees used to construct the model in a
compact matrix structure. This function extracts the information from a single
tree and displays it in a slightly more readable form. This function is mostly
for debugging purposes and to satisfy some users' curiosity.

1 | ```
pretty.gbm.tree(object, i.tree = 1)
``` |

`object` |
a |

`i.tree` |
the index of the tree component to extract from |

`pretty.gbm.tree`

returns a data frame. Each row corresponds to a node in
the tree. Columns indicate

`SplitVar` |
index of which variable is used to split. -1 indicates a terminal node. |

`SplitCodePred` |
if the split variable is continuous then this component
is the split point. If the split variable is categorical then this component
contains the index of |

`LeftNode` |
the index of the row corresponding to the left node. |

`RightNode` |
the index of the row corresponding to the right node. |

`ErrorReduction` |
the reduction in the loss function as a result of splitting this node. |

`Weight` |
the total weight of observations in the node. If weights are all equal to 1 then this is the number of observations in the node. |

Greg Ridgeway [email protected]

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.