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

View source: R/visualize.R

visualize_ppsR Documentation

Visualize the Predictive Power scores of the entire dataframe, or given a target

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

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

visualize_pps(iris, y = 'Species')

visualize_pps(iris)

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

ppsr documentation built on June 22, 2024, 7:15 p.m.