importance | R Documentation |
The function computes variable importance for each predictor from a rank-based random forests model or boosting model. A higher value indicates a more important predictor. The random forest implementation was performed via the function vimp
directly imported from the randomForestSRC
package. Use the command package?randomForestSRC
for more information. The boosting implementation was performed via the function relative.influence
directly imported from the gbm
package. For technical details, see the
vignette: utils::browseVignettes("gbm")
.
importance(object, ...)
object |
An object of class |
... |
Further arguments passed to or from other methods. |
For the boosting model, a vector of variable importance values is given. For the random forest model, a matrix of variable importance values is given for the variable importance index for all
the class labels, followed by the index for each class label.
Ruijie Yin (Maintainer,<ruijieyin428@gmail.com>), Chen Ye and Min Lu
Lu M. Yin R. and Chen X.S. Ensemble Methods of Rank-Based Trees for Single Sample Classification with Gene Expression Profiles. Journal of Translational Medicine. 22, 140 (2024). doi: 10.1186/s12967-024-04940-2
data(tnbc)
######################################################
# Random Forest
######################################################
obj <- rforest(subtype~., data = tnbc[,c(1:10,337)])
importance(obj)
######################################################
# Boosting
######################################################
obj <- rboost(subtype~., data = tnbc[,c(1:10,337)])
importance(obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.