remove_high_corr_features | R Documentation |
Wrapper function of caret::findCorrelation: find and remove highly correlated features
remove_high_corr_features(df, level = 0.99, simplify = FALSE)
df |
a data frame of numerical values w/o NAs |
level |
a numeric for threshold as cutoff point for defining 'high correlation' requires data frame of numeric w/o missing values |
if level == 1, find all perfectly correlated variables, remove half and return a list containing removed feature name pairs, unless simplify == TRUE
returns a list of 1) reduced df 2) corr table of removed features
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.