View source: R/dplot3_varimp.R
dplot3_varimp | R Documentation |
Plot variable importance using plotly
dplot3_varimp(
x,
names = NULL,
main = NULL,
xlab = "Variable Importance",
ylab = "",
plot.top = 1,
labelify = TRUE,
col = NULL,
alpha = 1,
palette = NULL,
mar = NULL,
font.size = 16,
axis.font.size = 14,
theme = rtTheme,
showlegend = TRUE,
...
)
x |
Vector, numeric: Input |
names |
Vector, string: Names of features |
main |
Character: main title |
xlab |
Character: x-axis label |
ylab |
Character: y-axis label |
plot.top |
Float or Integer: If <= 1, plot this percent highest absolute values, otherwise plot this many top values.
i.e.: |
labelify |
Logical: If TRUE convert |
col |
Vector, colors: Single value, or multiple values to define bar (feature) color(s) |
alpha |
Numeric: Transparency |
palette |
Character: Name of rtemis palette to use. |
mar |
Vector, numeric, length 4: Plot margins in pixels (NOT inches). Default = c(50, 110, 50, 50) |
font.size |
Integer: Overall font size to use (essentially for the title at this point). Default = 14 |
axis.font.size |
Integer: Font size to use for axis labels and tick labels
(Seems not to be in same scale as |
theme |
Output of an rtemis theme function (list of parameters) or theme
name. Use |
showlegend |
Logical: If TRUE, show legend |
... |
Additional arguments passed to theme |
A simple plotly
wrapper to plot horizontal barplots, sorted by value,
which can be used to visualize variable importance, model coefficients, etc.
E.D. Gennatas
# made-up data
x <- rnorm(10)
names(x) <- paste0("Feature_", seq(x))
dplot3_varimp(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.