Caret package findCorrelation() function

statsstudent718 picture statsstudent718 · Jan 30, 2016 · Viewed 9.2k times · Source

Hello I am having trouble with the findCorrelation() function, Here is my input and the output:

findCorrelation(train, cutoff = .50, verbose = FALSE)

Error in findCorrelation_exact(x = x, cutoff = cutoff, verbose = verbose) : correlation matrix is not symmetric

Does anyone know why this is happening?

Answer

wotter picture wotter · Mar 6, 2016

the findCorrelation function expects a correlation matrix as x value, so try this instead:

findCorrelation(cor(train), cutoff = .50, verbose = FALSE)

Reference: Caret pre-processing