Newer
Older
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getTreeranger.R
\name{getTreeranger}
\alias{getTreeranger}
\title{Get a list of structured trees from a ranger object.}
getTreeranger(RF, num.trees = RF$num.trees, add_layer = FALSE, num.threads = 1)
\item{RF}{A \code{\link[ranger:ranger]{ranger::ranger}} object which was created with \code{keep.inbag = TRUE}.}
\item{num.trees}{(Deprecated) Number of trees to convert (Default: \code{RF$num.trees}).}
\item{add_layer}{(Default: \code{FALSE}) Whether to \code{\link[=addLayer]{addLayer()}} in the same loop.}
\item{num.threads}{(Default: 1) Number of threads to spawn for parallelization.}
A list of tree data frames of length \code{RF$num.trees}.
Each row of the tree data frames corresponds to a node of the respective tree and the columns correspond to:
\item \code{nodeID}: ID of the respective node (important for left and right daughters in the next columns)
\item \code{leftdaughter}: ID of the left daughter of this node
\item \code{rightdaughter}: ID of the right daughter of this node
\item \code{splitvariable}: ID of the split variable
\item \code{splitpoint}: Split point of the split variable.
For categorical variables this is a comma separated lists of values, representing the factor levels (in the original order) going to the right.
\item \code{status}: \code{0} for terminal (\code{splitpoint} is \code{NA}) and \code{1} for non-terminal.
\item \code{layer}: If \code{add_layer} is \code{TRUE}, see \code{\link[=addLayer]{addLayer()}}
}
}
\description{
This functions creates a list of trees for ranger objects similar as getTree function does for random Forest objects.
}