| leaf_donors | R Documentation |
Fits y ~ X on the training rows and, for every row to predict, returns a
training row drawn at random from the same leaf.
leaf_donors(y, X, train, pred, minbucket = 5, cp = 1e-04)
y |
Target (factor or numeric), full length. |
X |
Predictor data.frame, full length. |
train, pred |
Logical vectors: rows to fit on and rows to draw for. |
minbucket, cp |
rpart controls; leaves hold at least |
list(donor = row indices into y, leaves, fallback flag).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.