Data Science Desktop Survival Guide
by Graham Williams
20180726 The FSelector package provides functions to identify subsets of variables that might be more effective for modelling. We can use this (and other packages) to assist us in reducing the variables that will be useful in our modelling. As we find useful functionality we will add them to our standard template so that for our next dataset we have the functionality readily available.
We first use FSelector::cfs() to identify a good subset of variables using correlation and entropy. We then list the variable importance using FSelector::information.gain() to advise a useful subset of variables. Note that the stringi::https://www.rdocumentation.org/packages/stringi/topics/to concatenate strings together to produce a formula that indicates we will model the target variable using all of the other variables of the dataset.
# Construct the formulation of the modelling we plan to do.
form <- formula(target %s+% " ~ .") %T>% print()
# Use correlation search to identify key variables.
# Use information gain to identify variable importance.