visualize_pps {ppsr} | R 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 |
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 |
include_target |
boolean, whether to include the target variable in the barplot |
... |
any arguments passed to |
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)