Description Usage Arguments Value Examples
Generic Function to get the importance of features in a xgboost model
1 | xgboostVariableImportance(mod, N = 30, allowedVariables = NULL)
|
mod |
a Model from |
N |
The Number of features to return |
allowedVariables |
Features that are allowed to be included |
A list containing a data.table with the variable importance scores and a ggplot
1 2 3 4 5 6 7 8 | set.seed(42)
x = iris
x$Species = ifelse(x$Species == "versicolor",1, 0)
dat = splitDataToTrainTestDataFrame(x,.9,.25)
mod = xgboostModel(dat,"Species")
v = xgboostVariableImportance(mod)
v = xgboostVariableImportance(mod, 30, allowedVariables = c("Sepal.Length","Sepal.Width"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.