Build a model taking a data frame as input
# S3 method for default
brif(
x,
n_numeric_cuts = 31,
n_integer_cuts = 31,
max_integer_classes = 20,
max_depth = 20,
min_node_size = 1,
ntrees = 200,
ps = 0,
max_factor_levels = 30,
seed = 0,
bagging_method = 0,
bagging_proportion = 0.9,
split_search = 4,
search_radius = 5,
verbose = 0,
nthreads = 2,
...
)
an object of class brif
, which is a list containing the following components. Note: this object is not intended for any use other than that by the function predict.brif
. Do not apply the str
function on this object because the output can be long and meaningless especially when ntrees is large. Use summary
to get a peek of its structure. Use printRules
to print out the decision rules of a particular tree. Most of the data in the object is stored in the tree_leaves element (which is a list of lists by itself) of this list.
an integer scalar, the number of variables (predictors) used in the model
an character vector of length (p+1) containing the variable names, including the target variable name as its first element
an character vector of length (p+1) containing the variable types, including that of the target variable as its first element
an integer vector of length (p+1), containing the numbers of binary columns generated for each variable
an integer scalar indicating the number of trees in the model
an integer vector specifying the internal index, for each variable, in its type group
a list containing split point information on numeric variables
a list containing split point information on integer variables
a list containing split point information on factor variables
an integer scalar indicating the numeric variables in the model
an integer scalar indicating the integer variables in the model
an integer scalar indicating the factor variables in the model
a list containing all the leaves in the forest
a list containing the target variable encoding scheme
a data frame containing the training data set. The first column is taken as the target variable and all other columns are used as predictors.
an integer value indicating the maximum number of split points to generate for each numeric variable.
an integer value indicating the maximum number of split points to generate for each integer variable.
an integer value. If the target variable is integer and has more than max_integer_classes unique values in the training data, then the target variable will be grouped into max_integer_classes bins. If the target variable is numeric, then the smaller of max_integer_classes and the number of unique values number of bins will be created on the target variables and the regression problem will be solved as a classification problem.
an integer specifying the maximum depth of each tree. Maximum is 40.
an integer specifying the minimum number of training cases a leaf node must contain.
an integer specifying the number of trees in the forest.
an integer indicating the number of predictors to sample at each node split. Default is 0, meaning to use sqrt(p), where p is the number of predictors in the input.
an integer. If any factor variables has more than max_factor_levels, the program stops and prompts the user to increase the value of this parameter if the too-many-level factor is indeed intended.
an integer specifying the seed used by the internal random number generator. Default is 0, meaning not to set a seed but to accept the set seed from the calling environment.
an integer indicating the bagging sampling method: 0 for sampling without replacement; 1 for sampling with replacement (bootstrapping).
a numeric scalar between 0 and 1, indicating the proportion of training observations to be used in each tree.
an integer indicating the choice of the split search method. 0: randomly pick a split point; 1: do a local search; 2: random pick subject to regulation; 3: local search subject to regulation; 4 or above: a mix of options 0 to 3.
an positive integer indicating the split point search radius. This parameter takes effect only in the self-regulating local search (split_search = 2 or above).
an integer (0 or 1) specifying the verbose level.
an integer specifying the number of threads used by the program. This parameter takes effect only on systems supporting OpenMP.
additional arguments.