View source: R/HCD-Implement.R
HCDplot | R Documentation |
Generate dendrogram of the HCD result.
HCDplot(hcd,mode="community",labels=NULL,main=NULL,label.cex=1)
hcd |
The result of an HCD call. |
mode |
plotting community hierarchy or node hierarchy. The default value is "community", indicating plotting hierarchy between communities. Alternatively, the plot is for all nodes, which is not recommended because usually there are too many of them. |
labels |
the labels of the each leaf of the tree. By default, the community/node index is used. The user can also specify another sequence of characters. |
main |
title of the plot. |
label.cex |
size of the leaf label in the plot. When plotting node hierarchy, typically there are too many nodes so the labels will seriously overlap. Use a smaller size (say, label.cex=0.3) may help. |
No return value, called for visualization.
Tianxi Li, Lihua Lei, Sharmodeep Bhattacharyya, Purnamrita Sarkar, Peter Bickel, and Elizaveta Levina.
Maintainer: Tianxi Li <tianxili@umn.edu>
Li, T., Lei, L., Bhattacharyya, S., Van den Berge, K., Sarkar, P., Bickel, P.J. and Levina, E., 2022. Hierarchical community detection by recursive partitioning. Journal of the American Statistical Association, 117(538), pp.951-968.
dt <- BTSBM(n=80,d=4,a.seq=0.2^seq(0,4),lambda=20)
A <- dt$A.list[[1]]
system.time(HCD.result <- HCD(A,method="SC",stopping="Fix",D=4,notree=FALSE,n.min=5))
HCDplot(HCD.result,mode="community",main="Community Tree")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.