View source: R/trans_feature_selection_corr.R
| feature_selection_corr | R Documentation |
Remove highly correlated numeric features based on a correlation cutoff.
feature_selection_corr(cutoff = 0.9, features = NULL, keep = NULL)
cutoff |
correlation cutoff in [0, 1] above which one feature is removed |
features |
optional vector of feature names to consider (default: all numeric columns) |
keep |
optional vector of columns that should always be kept in |
For each pair of numeric features whose absolute correlation exceeds cutoff,
the one with the larger mean absolute correlation to the remaining features is removed,
reducing redundancy among predictors.
returns an object of class feature_selection_corr
Hall, M. A. (1999). Correlation-based Feature Selection for Machine Learning. PhD thesis, University of Waikato. Kuhn, M. (2008). Building Predictive Models in R Using the caret Package. Journal of Statistical Software, 28(5):1-26.
data(iris)
fs <- feature_selection_corr(cutoff = 0.9)
fs <- fit(fs, iris)
iris_fs <- transform(fs, iris)
fs$selected
names(iris_fs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.