View source: R/VariableImportance.R
barplot.BranchGLMVI | R Documentation |
Creates a bar plot with the L0-penalization based variable importance values.
## S3 method for class 'BranchGLMVI'
barplot(
height,
modified = FALSE,
horiz = TRUE,
decreasing = FALSE,
which = "all",
las = ifelse(horiz, 1, 2),
main = NULL,
lab = NULL,
...
)
height |
a |
modified |
a logical value indicating if the modified variable importance values should be plotted. |
horiz |
a logical value to indicate whether bars should be horizontal. |
decreasing |
a logical value to indicate whether variables should be sorted in decreasing order. Can use NA if no ordering is desired. |
which |
which variable importance values to plot, can use a numeric vector of indices, a character vector of names, or "all" for all variables. |
las |
the style of axis labels, see par for more details. |
main |
the overall title for the plot. |
lab |
the title for the axis corresponding to the variable importance values. |
... |
further arguments passed to barplot.default. |
This only produces a plot, nothing is returned.
Data <- iris
Fit <- BranchGLM(Sepal.Length ~ ., data = Data, family = "gaussian", link = "identity")
# Doing branch and bound selection
VS <- VariableSelection(Fit, type = "branch and bound", metric = "BIC",
showprogress = FALSE)
# Getting variable importance
VI <- VariableImportance(VS, showprogress = FALSE)
VI
# Plotting variable importance
oldmar <- par("mar")
par(mar = c(4, 6, 3, 1) + 0.1)
barplot(VI)
par(mar = oldmar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.