isle_post | R Documentation |
Uses glmnet
or cv.glmnet
to fit
the entire LASSO path for post-processing the individual trees of a
tree-based ensemble (e.g., a random forest).
isle_post( X, y, newX = NULL, newy = NULL, cv = FALSE, nfolds = 5, family = NULL, loss = "default", offset = NULL, ... )
X |
A matrix of training predictions, one column for each tree in the ensemble. |
y |
Vector of training response values. See |
newX |
Same as argument |
newy |
Same as argument |
cv |
Logical indicating whether or not to use n-fold cross-validation.
Default is |
nfolds |
Integer specifying the number of folds to use for
cross-validation (i.e., whenever |
family |
The model fitting family (e.g., |
loss |
Optional character string specifying the loss to use for
n-fold cross-validation. Default is |
offset |
Optional value for the offset. Default is |
... |
Additional (optional) arguments to be passed on to
|
A list with two components:
results
A data frame with one row for each value of lambda in the coefficient path and columns giving the corresponding number of trees/non-zero coefficients, error metric(s), and the corresponding value of lambda.
The fitted glmnet
or
cv.glmnet
object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.