Description Usage Arguments Value See Also Examples
Residuals will be binned using boxplotstats with the modification, that the median will be set to zero. If quantile boundaries do not fall into sensible ranges they will be replaced by the standard error (SE). For example if we have the following boxplotstats -2, 1, 3, 5, 8 with an SE of 0.5 we will modify the boundaries as following. -2, -0.5, 0, 3, 5 . The reason is that we want to be able to follow observations with positive or negative residuals through the alluvial plot in order to judge emerging patterns. The models will be sorted by MSE and the alluvial plot will be flipped with the model with the lowest MSE on top.
1 2 | f_predict_plot_regression_alluvials(data, col_id, col_title = "title",
col_pred = "pred", col_obs = "target1", ...)
|
data |
dataframe |
col_id |
character vecotr dentoing id column |
col_title |
character vector denoting model title column, Default: 'title' |
col_pred |
character vector denoting prediciont column, Default: 'pred' |
col_obs |
character vector denoting column with observed values, Default: 'target1' |
... |
additional arguments passed to f_plot_alluvial_1v1 |
plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | form = as.formula( 'displacement~cylinders+mpg')
df = ISLR::Auto %>%
mutate( name = paste( name, row_number() ) ) %>%
pipelearner::pipelearner() %>%
pipelearner::learn_models( rpart::rpart, form ) %>%
pipelearner::learn_models( randomForest::randomForest, form ) %>%
pipelearner::learn_models( e1071::svm, form ) %>%
pipelearner::learn() %>%
f_predict_pl_regression( 'name' ) %>%
unnest(preds)
f_predict_plot_regression_alluvials(df
, col_id = 'name'
, col_title = 'model'
, col_pred = 'pred'
, col_obs = 'target1')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.