HCDplot {HCD} | R Documentation |
plot the result of hierarchical community detection
Description
Generate dendrogram of the HCD result.
Usage
HCDplot(hcd,mode="community",labels=NULL,main=NULL,label.cex=1)
Arguments
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. |
Value
No return value, called for visualization.
Author(s)
Tianxi Li, Lihua Lei, Sharmodeep Bhattacharyya, Purnamrita Sarkar, Peter Bickel, and Elizaveta Levina.
Maintainer: Tianxi Li <tianxili@umn.edu>
References
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.
Examples
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")