Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

add_imp_plot

add bar plot of important features to model response alluvial plot


Description

adds bar plot of important features to model response alluvial plot

Usage

add_imp_plot(grid, p = NULL, data_input, plot = T, ...)

Arguments

grid

gtable or ggplot

p

alluvial plot, optional if alluvial plot has already been passed as grid. Default: NULL

data_input

dataframe used to generate alluvial plot

plot

logical if plot should be drawn or not

...

additional parameters passed to plot_imp

Value

gtable

See Also

Examples

## Not run: 
df = mtcars2[, ! names(mtcars2) %in% 'ids' ]

train = caret::train( disp ~ .
                     , df
                     , method = 'rf'
                     , trControl = caret::trainControl( method = 'none' )
                     , importance = TRUE )

pred_train = caret::predict.train(train, df)

p = alluvial_model_response_caret(train, degree = 4, pred_train = pred_train)

p_grid = add_marginal_histograms(p, data_input = df)

p_grid = add_imp_plot(p_grid, p, data_input = df)

## End(Not run)

easyalluvial

Generate Alluvial Plots with a Single Line of Code

v0.3.0
CC0
Authors
Bjoern Koneswarakantha [aut, cre] (<https://orcid.org/0000-0003-4585-7799>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.