Selecting features using the caret package
The feature selection method searches the subset of features with minimized predictive errors. We can apply feature selection to identify which attributes are required to build an accurate model. The
caret package provides a recursive feature elimination function,
rfe, which can help automatically select the required features. In the following recipe, we will demonstrate how to use the
caret package to perform feature selection.
In this recipe, we will continue to use the telecom
churn dataset as the input data source for feature selection.
How to do it...
Perform the following steps to select features:
- Transform the feature named as
international_planof the training dataset,