Skip to contents

Plots the top features from analyze_target() by association strength.

Usage

plot_target(data, target, top = 20, max_levels = 50)

Arguments

data

A data frame.

target

Name of the target column (a single string).

top

Number of top features to show (default 20).

max_levels

Categorical variables with more distinct levels than this are skipped (reported with NA strength). Default 50.

Value

A ggplot object.

Examples

df <- data.frame(y = rnorm(50), a = rnorm(50), b = rnorm(50))
plot_target(df, "y")