group_func_2 creates groups of variables based on community analysis.

group_func_2(absXcor, c0)

Arguments

absXcor

A numeric matrix. The absolute value of a correlation or distance matrix.

c0

A numeric scalar. The thresholding

Value

A list with one entry: the list of groups. Attributes:

  • "type": "normal"

  • "length.groups" the length of each groups.

Details

This is a function used to create a list of groups using an input matrix and a thresholding value c0. A group is made, for every column in the input matrix. It uses the infomap.community function of the igraph package.

References

selectBoost: a general algorithm to enhance the performance of variable selection methods in correlated datasets, Frédéric Bertrand, Ismaïl Aouadi, Nicolas Jung, Raphael Carapito, Laurent Vallat, Seiamak Bahram, Myriam Maumy-Bertrand, Bioinformatics, 2020. doi:10.1093/bioinformatics/btaa855

See also

Author

Frederic Bertrand, frederic.bertrand@utt.fr

Examples

set.seed(314)
group_func_2(cor(matrix(rnorm(100),10,10)),.5)
#> $communities
#> $communities$`1`
#> [1] 1
#> 
#> $communities$`2`
#> [1] 2
#> 
#> $communities$`3`
#> [1] 3
#> 
#> $communities$`4`
#> [1] 4 5 7 8
#> 
#> $communities$`5`
#> [1] 6
#> 
#> $communities$`6`
#> [1] 9
#> 
#> $communities$`7`
#> [1] 10
#> 
#> 
#> attr(,"type")
#> [1] "compact"