mplot_splits: Split and compare quantiles plot

Description Usage Arguments Value See Also Examples

View source: R/model_plots.R

Description

This function lets us split and compare quantiles on a given prediction to compare different categorical values vs scores grouped by equal sized buckets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mplot_splits(
  tag,
  score,
  splits = 5,
  subtitle = NA,
  model_name = NA,
  save = FALSE,
  subdir = NA,
  file_name = "viz_splits.png"
)

Arguments

tag

Vector. Real known label.

score

Vector. Predicted value or model's result.

splits

Integer. Number of separations to plot

subtitle

Character. Subtitle to show in plot

model_name

Character. Model's name

save

Boolean. Save output plot into working directory

subdir

Character. Sub directory on which you wish to save the plot

file_name

Character. File name as you wish to save the plot

Value

Plot with distribution and performance results by splits.

See Also

Other ML Visualization: mplot_conf(), mplot_cuts_error(), mplot_cuts(), mplot_density(), mplot_full(), mplot_gain(), mplot_importance(), mplot_lineal(), mplot_metrics(), mplot_response(), mplot_roc(), mplot_topcats()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
Sys.unsetenv("LARES_FONT") # Temporal
data(dfr) # Results for AutoML Predictions
lapply(dfr, head)

# For categorical (binary) values
mplot_splits(dfr$class2$tag, dfr$class2$scores,
             splits = 4,
             model_name = "Titanic Survived Model")

# For categorical (+2) values
mplot_splits(dfr$class3$tag, dfr$class2$scores,
             model_name = "Titanic Class Model")

# For continuous values
mplot_splits(dfr$regr$tag, dfr$regr$score, splits = 4,
             model_name = "Titanic Fare Model")

lares documentation built on June 9, 2021, 9:06 a.m.