Report targetpct"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Automated Exploratory Analysis (auto EDA) using the report() function of the explore package.

In this example we use synthetic data created by the create_data_churn()function of the explore package.

library(dplyr)
library(explore)
data <- create_data_churn()

Then we generate the report.

data %>% report(target = churn, targetpct = TRUE, output_dir = tempdir())

Explore

Describe Data

data %>% explore_tbl()
data  %>%  describe_tbl()
describe(data)

Describe Target

data %>% explore(churn)

Explore Variables

# create buckets of variables
buckets <- data  %>%  
  explore::get_var_buckets(
    bucket_size = 100
  )

# height of each plot
fig_height <- data[buckets[[1]]]  %>%  
  explore::total_fig_height(size = 2)
for (i in seq_along(buckets)) {
  data[buckets[[i]]]  %>%  
    explore_all(target = churn, targetpct = TRUE, ncol = 2)
} 


Try the explore package in your browser

Any scripts or data that you put into this service are public.

explore documentation built on Oct. 11, 2023, 9:07 a.m.