FindCorrelation Function in R

i have a few Q on findCorrelation() function in CARET package in R.

when i am using this code:

  correlations <- cor(list)
  highCorr <- findCorrelation(correlations, cutoff = .6, names = FALSE)
  new_list <- list[, -highCorr]
  1. does it remove all features above 0.6 and underneath -0.6?
  2. lets say i have two correlated features, male and female (its not all the same because of missing values), how does the function select which one to remove if they are correlated with each other?

1 Answer

  1. does it remove all features above 0.6 and underneath -0.6?

If what you're asking is whether the pair-wise correlation between two variables being greater than 0.6 is treated the same as the pair-wise correlation being less than -0.6, then the answer is yes. From the documentation: "The absolute values of pair-wise correlations are considered."

  1. how does the function select which one to remove if they are correlated with each other?

Again from the documentation: "the function looks at the mean absolute correlation of each variable and removes the variable with the largest mean absolute correlation." So in other words, it chooses one of the two variables based on how correlated it is with all the other variables.

See help(findCorrelation) for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest