-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Practical Machine Learning with R
By :
Redundant features are those that are highly correlated with each other. They will contain similar information with respect to their output variables. We can remove such features by finding correlation coefficients between features.
In this exercise, we will find redundant features, select any one among them, and remove them.
#Loading the library
library(caret)
# load the German Credit Data
data(GermanCredit)
# calculating the correlation matrix
correlationMatrix <- cor(GermanCredit[,1:9])
# printing the correlation matrix
print(correlationMatrix)
The output is as follows:

# finding the attributes that are highly corrected
filterCorrelation <- findCorrelation(correlationMatrix, cutoff...