Create a plot to explore relation between numerical variable and a binary target
target_explore_num(
data,
var,
target = "target_ind",
min_val = NA,
max_val = NA,
bins = 10,
flip = TRUE,
title = NA,
auto_scale = TRUE,
na = NA,
color = c("#ECEFF1", "#CFD8DC", "#B0BEC5", "#90A4AE"),
legend_position = "bottom"
)
Plot object
A dataset
Numerical variable
Target variable (0/1 or FALSE/TRUE)
All values < min_val are converted to min_val
All values > max_val are converted to max_val
Nuber of bins
Should plot be flipped? (change of x and y)
Title of plot
Use 0.02 and 0.98 quantile for min_val and max_val (if min_val and max_val are not defined)
Value to replace NA
Color vector (4 colors)
Position of legend ("right"|"bottom"|"non")