BSHorizontalStack {Sstack} | R Documentation |
Horizontal stacking Random Forest models.
Description
Generate the weights for a horizontally stacked set of Random Forest (RF) models given a set of heterogeneous datasets. For horizontal stacking some subset of samples must be common among all datasets. Subfunction of BSstack but can be used stand-alone.
Usage
BSHorizontalStack(T = 100, mtry = NA, nodesize = 5, iter = 100,
Xn = NULL, ECHO = TRUE, Cf = NULL, Y, X1, X2, ...)
Arguments
T |
Number of trees for the individual RF models. (int) |
mtry |
Number of variables available for splitting at each tree node. If a scalar is given then all models use the given values. If a 1D array is given then each individual model uses the given value. |
nodesize |
Minimum size of terminal nodes. If a scalar is given then all models use the given values. If a 1D array is given then each individual model uses the given value. By default all models use 5. |
iter |
The number of time to bootstrap sample the data. (int) |
Xn |
List containing each dataset to be stacked. If not supplied will be generated from X1, X2, ... |
ECHO |
Bool, enable to provide output to the user in terms of overlapping samples and runtime for CV. |
Cf |
Character vector listing set of samples common among all given datasets. If not found will generate on it's own. |
Y |
Nsample x 1 data table of responses for ALL samples. Must have matching rownames with each individual dataset. |
X1 |
Data table of first dataset to be stacked. Rownames should be contained within Y. |
X2 |
Data table of second dataset to be stacked. Rownames should be contained within Y. |
... |
Further data tables, X3, X4, ..., Xl. |
Details
Required Packages: dplyr, randomForest, foreach
Value
Weights and offsets for each individual RF model.