filter_var {autoScorecard}R Documentation

Data Filtering

Description

Data Filtering

Usage

filter_var(
  df,
  key_var,
  y_var,
  missing_rate,
  single_var_rate,
  iv_set,
  char_to_number = TRUE,
  na.omit = TRUE
)

Arguments

df

A data.frame with independent variables and target variable.

key_var

A name of index variable name.

y_var

A name of target variable.

missing_rate

Data missing rate, variables smaller than this setting will be deleted.

single_var_rate

The maximum proportion of a single variable, the variable greater than the setting will be deleted.

iv_set

IV value minimum threshold, variable IV value less than the setting will be deleted.

char_to_number

Whether to convert character variables to numeric.

na.omit

na.omit returns the object with incomplete cases removed.

Value

A data frame.

Examples

accepts <- read.csv( system.file( "extdata" , "accepts.csv",package = "autoScorecard" ))
fff1 <- filter_var( df = accepts, key_var = "application_id", y_var = "bad_ind", missing_rate = 0,
single_var_rate = 1, iv_set = 0.02 )

[Package autoScorecard version 0.3.0 Index]