BestForestSplit
searches through possible variables in order to find the most accurate split.
It returns the variable chosen, the model, and the two sets of fitted values where both 0 or 1 are considered a "success."
BestForestSplit(response, data, num.features, ntry, weights = rep(1,
nrow(data)))
Logical vector of 0 and 1 denoting the binomial response.
A data frame or matrix consisting of all possible variables to attempt.
A numeric of the number of variables in the dataset to possibly try. The leftmost number of variables in the dataset are the variables chosen.
A numeric of the number of variables from the num.features
to attempt to split. This is useful for building random forests. For a standard tree, choose ntry = num.features
.
A vector of weights for use in Weighted Least Squares. Defaults to a vector of 1.
List of elements
Returns the variable chosen for best split.
A glm
object of the fit with the chosen variable.
A vector of the weights if response 0
was considered a success. Calculated as \(1 - weights1\).
A vector of the weights if response 1
was considered a success.
BestForestSplit
searches through possible variables to split using single variable logistic regression
with prior weights in the iteratively reweighted least squares procedure. The variable minimizing residual deviance is chosen. Note, this is a valid choice
since all models being compared are using the same Null Model containing only the intercept with equal weights.