Learn R Programming

mikropml (version 1.6.1)

cluster_corr_mat: Cluster a matrix of correlated features

Description

Cluster a matrix of correlated features

Usage

cluster_corr_mat(bin_corr_mat, hclust_method = "single", cut_height = 0)

Value

a named vector from stats::cutree(). Each element is a cluster and the name is a feature in that cluster.

Arguments

bin_corr_mat

a binary correlation matrix created by get_binary_corr_mat().

hclust_method

the method to use in stats::hclust() (default: 'single').

cut_height

the cut height (h) to use in stats::cutree() (default: 0).

Author

Kelly Sovacool, sovacool@umich.edu

Pat Schloss, pschloss@umich.edu

Examples

Run this code
if (FALSE) {
corr_mat <- matrix(
  data = c(1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1),
  nrow = 4,
  dimnames = list(
    c("a", "b", "c", "d"),
    c("a", "b", "c", "d")
  )
)
corr_mat
cluster_corr_mat(corr_mat)
}

Run the code above in your browser using DataLab