featureCorMatrix: Calculates the Feature Correlation Matrix

Description Usage Arguments Details Value Examples

View source: R/featureCorMatrix.R

Description

featureCorMatrix returns a correlation matrix between all features

Usage

1
featureCorMatrix(dataframe, absoluteValues = FALSE)

Arguments

dataframe

A data.frame

absoluteValues

A flag stating if only positive correlations should be returned

Details

The function selects automatically the appropriate correlation coefficient regarding the storage type of both variables - If both variable are numerical ones, the Pearson product-moment correlation coefficient will be chosen - If both variables are categorical, Cramer's V will be used - If one variable is a numerical and the other a categorical one, the Intraclass correlation will be calculated

Value

A correlation matrix

Examples

1
featureCorMatrix(dataframe = iris, absoluteValues = TRUE)

Example output

$correlationMatrix
             Sepal.Length Sepal.Width Petal.Length Petal.Width   Species
Sepal.Length    1.0000000   0.1175698    0.8717538   0.8179411 0.7865785
Sepal.Width     0.1175698   1.0000000    0.4284401   0.3661259 0.6330741
Petal.Length    0.8717538   0.4284401    1.0000000   0.9628654 0.9702431
Petal.Width     0.8179411   0.3661259    0.9628654   1.0000000 0.9637857
Species         0.7865785   0.6330741    0.9702431   0.9637857 1.0000000

$corrTypeMatrix
             Sepal.Length Sepal.Width Petal.Length Petal.Width Species   
Sepal.Length "cor"        "cor"       "cor"        "cor"       "icc"     
Sepal.Width  "cor"        "cor"       "cor"        "cor"       "icc"     
Petal.Length "cor"        "cor"       "cor"        "cor"       "icc"     
Petal.Width  "cor"        "cor"       "cor"        "cor"       "icc"     
Species      "icc"        "icc"       "icc"        "icc"       "cramersV"

featureCorMatrix documentation built on July 1, 2020, 10:38 p.m.