Description Usage Arguments Value See Also Examples
takes a dataframe with predictions and a title column and returns a list with one violin and one histogram plot to compare distributions.
1 2 | f_predict_plot_regression_distribution(data, col_title = "title",
col_pred = "pred", col_obs = "target1", bins = 60, ...)
|
data |
dataframE |
col_title |
character vector denoting title column, Default: 'title' |
col_pred |
character vector denoting column with predictions, Default: 'preds' |
col_obs |
character vecor denoting column with observed values, Default: 'target1' |
bins |
number of bins used for histograms, Default: 60 |
... |
additional arguments passed to the facet_wrap function of the histogramss |
list with two plots
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | form = as.formula( 'displacement~cylinders+mpg')
df = ISLR::Auto %>%
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_distribution(df
, 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.