rf.class.fit: Random Forest (RF) for Classification

Description Usage Arguments Value Author(s)

Description

Fit a Random Forest Classifier.

Usage

1
2
3
rf.class.fit(X, Y, d = NULL, alpha = NULL, ntrees = 10L,
  bagg = 0.632, depth.max = 5L, size = 1L, debug = FALSE,
  mc.cores = 1L, ...)

Arguments

X

the predictors. A [n, p] matrix.

Y

the responses. A [n] vector or, optionally, a factor.

d

the number of features to subsample at a split node. Defaults to as.integer(round(sqrt(p))), where p is the dimensionality of the predictor feature space.

alpha

the feature sampling prior. Corresponds to alpha for a Dirichlet distribution. If NULL, samples uniformly.

ntrees

the number of trees to construct. Defaults to 10L.

bagg

the relative size of the subsamples for the training set. A numeric s.t. 0 < bagg <= 1. Each subsample will be bagg*n elements. Defaults to 0.632.

depth.max

the maximum allowed tree depth. Defaults to 5L.

size

the minimum allowed number of samples for an individual node. Defaults to 1L.

debug

whether to save the predictors and responses that are categorized. Defaults to FALSE.

mc.cores

the number of cores to use. Should be 0 < mc.cores <= parallel::detectCores(). Defaults to 1L.

Value

an object of class rf.class containing the following:

forest

A list a decision trees.

method

the method used to fit the forest.

alpha

the hyperparams for sampling distn of feature probabilities.

Author(s)

Eric Bridgeford


ebridge2/badmf documentation built on June 4, 2019, 8:53 a.m.