Calculates the FM_index Correlation for some k.

cor_FM_index(dend1, dend2, k, ...)

Arguments

dend1

a dendrogram.

dend2

a dendrogram.

k

an integer (number of clusters to cut the tree)

...

not used.

Value

A correlation value between 0 to 1 (almost identical clusters for some k)

See also

Examples

set.seed(23235) ss <- sample(1:150, 10) hc1 <- iris[ss, -5] %>% dist() %>% hclust("com") hc2 <- iris[ss, -5] %>% dist() %>% hclust("single") dend1 <- as.dendrogram(hc1) dend2 <- as.dendrogram(hc2) cor_FM_index(dend1, dend2, k = 2)
#> [1] 1 #> attr(,"E_FM") #> [1] 0.5333333 #> attr(,"V_FM") #> [1] 0.005833333
cor_FM_index(dend1, dend2, k = 3)
#> [1] 0.6804138 #> attr(,"E_FM") #> [1] 0.3265986 #> attr(,"V_FM") #> [1] 0.008214286
cor_FM_index(dend1, dend2, k = 4)
#> [1] 0.6139406 #> attr(,"E_FM") #> [1] 0.2533723 #> attr(,"V_FM") #> [1] 0.01214557