compare_target_numeric: Comparison of numerical variables of train set and test set

Description Usage Arguments Details Value Examples

View source: R/split.R

Description

Compare the statistics of the numerical variables of the train set and test set included in the "split_df" class.

Usage

1

Arguments

.data

an object of class "split_df", usually, a result of a call to split_df().

...

one or more unquoted expressions separated by commas. Select the numeric variable you want to compare. You can treat variable names like they are positions. Positive values select variables; negative values to drop variables. If the first expression is negative, compare_target_numeric() will automatically start with all variables. These arguments are automatically quoted and evaluated in a context where column names represent column positions. They support unquoting and splicing.

Details

Compare the statistics of the numerical variables of the train set and the test set to determine whether the raw data is well separated into two data sets.

Value

tbl_df. Variables for comparison:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(dplyr)

# Credit Card Default Data
head(ISLR::Default)

# Generate data for the example
sb <- ISLR::Default %>%
  split_by(default)

sb %>%
  compare_target_numeric()

sb %>%
  compare_target_numeric(balance)

alookr documentation built on Feb. 22, 2021, 5:08 p.m.