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

plot_imp

plot feature importance


Description

plot important features of model response alluvial as bars

Usage

plot_imp(p, data_input, truncate_at = 50, color = "darkgrey")

Arguments

p

alluvial plot

data_input

dataframe used to generate alluvial plot

truncate_at

integer, limit number of features to that value, Default: 50

color

character vector, Default: 'darkgrey'

Value

ggplot object

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 = 3, pred_train = pred_train)

plot_imp(p, mtcars2)


## 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.