Learn R Programming

creditmodel (version 1.3.1)

low_variance_filter: Filtering Low Variance Variables

Description

low_variance_filter is for removing variables with repeated values up to a certain percentage.

Usage

low_variance_filter(
  dat,
  lvp = 0.97,
  only_NA = FALSE,
  note = FALSE,
  ex_cols = NULL
)

Arguments

dat

A data frame with x and target.

lvp

The maximum percent of unique values (including NAs).

only_NA

Logical, only process variables which NA's rate are more than lvp.

note

Logical.Outputs info.Default is TRUE.

ex_cols

A list of excluded variables. Default is NULL.

Value

A data.frame

Examples

Run this code
# NOT RUN {
dat = low_variance_filter(lendingclub[1:1000, ], lvp = 0.9)

# }

Run the code above in your browser using DataLab