powered by
Collapse correlated features
collapse_correlated_features( features, group_neg_corr = TRUE, corr_method = "spearman", corr_thresh = 1, progbar = NULL )
features where perfectly correlated ones are collapsed
dataframe of features for machine learning
Whether to group negatively correlated features together (e.g. c(0,1) and c(1,0)).
Correlation method. Options are the same as those supported by stats::cor: spearman, pearson, kendall. (default: spearman)
stats::cor
group correlations above or equal to corr_thresh (range 0 to 1; default: 1).
corr_thresh
0
1
optional progress bar (default: NULL)
NULL
Zena Lapp, zenalapp@umich.edu
if (FALSE) { collapse_correlated_features(mikropml::otu_small[, 2:ncol(otu_small)]) }
Run the code above in your browser using DataLab