visualize_pps: Visualize the Predictive Power scores of the entire...

Description Usage Arguments Value Examples

View source: R/visualize.R

Description

If y is specified, visualize_pps returns a barplot of the PPS of every predictor on the specified target variable. If y is not specified, visualize_pps returns a heatmap visualization of the PPS for all X-Y combinations in a dataframe.

Usage

1
2
3
4
5
6
7
8
9
visualize_pps(
  df,
  y = NULL,
  color_value_high = "#08306B",
  color_value_low = "#FFFFFF",
  color_text = "#FFFFFF",
  include_target = TRUE,
  ...
)

Arguments

df

data.frame containing columns for x and y

y

string, column name of target variable, can be left NULL to visualize all X-Y PPS

color_value_high

string, hex value or color name used for upper limit of PPS gradient (high PPS)

color_value_low

string, hex value or color name used for lower limit of PPS gradient (low PPS)

color_text

string, hex value or color name used for text, best to pick high contrast with color_value_high

include_target

boolean, whether to include the target variable in the barplot

...

any arguments passed to score

Value

a ggplot object, a vertical barplot or heatmap visualization

Examples

1
2
3
4
5
visualize_pps(iris, y = 'Species')

visualize_pps(iris)

visualize_pps(mtcars, do_parallel = TRUE, n_cores = 2)

ppsr documentation built on March 2, 2021, 5:06 p.m.