impute_missing_features: Impute missing features with the median, plus or minus some...

Description Usage Arguments Value

View source: R/calculate_features.R

Description

Replace missing data within each numeric column of a data frame with the column median, plus or minus some random noise, in order to train classifiers that do not readily ignore missing data (e.g. random forests or support vector machines).

Usage

1
impute_missing_features(dat, noise_pct = 0.05)

Arguments

dat

the feature data frame for which to replace missing data

noise_pct

the standard deviation of the random normal distribution from which to draw added noise, expressed as a percentage of the standard deviation of the non-missing values in each column

Value

a data frame with missing values in each numeric column replaced by the column median, plus or minus some random noise


fosterlab/CFTK documentation built on Jan. 19, 2021, 10:31 p.m.