f_predict_plot_regression_distribution: Plot distribution of model predictions vs observed

Description Usage Arguments Value See Also Examples

Description

takes a dataframe with predictions and a title column and returns a list with one violin and one histogram plot to compare distributions.

Usage

1
2
f_predict_plot_regression_distribution(data, col_title = "title",
  col_pred = "pred", col_obs = "target1", bins = 60, ...)

Arguments

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

Value

list with two plots

See Also

UQ brewer.pal

Examples

 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')

erblast/oetteR documentation built on May 27, 2019, 12:11 p.m.