View source: R/nethist_hybrid.R
| hnethist | R Documentation |
Estimating hybrid network histogram for single-layer networks and returning the indices of partitions.
hnethist(A, h = NA, method = "LSE", control = nethist_control(), ...)
A |
An adjacency matrix or an igraph object. It must be an undirected and simple graph. |
h |
A bandwidth parameter. If |
method |
Type of loss function for network histogram. Must be one of |
control |
A control object from |
... |
Currently unused. |
Among the outputs, the best model is selected based on the BIC criterion.
The original reference provided theoretical guarantees for LSE, but we also allow PLL for the initial nethist fit. The block clustering and model selection steps are performed on the LSE loss regardless of the initial method, as the theoretical results pertain to LSE.
Both stages are stochastic. The initial nethist() fit uses a greedy
search that swaps randomly chosen vertex pairs, and the merging step calls
stats::kmeans(), which draws its starting centres at random. Neither
stage seeds itself, so both consume the global random number stream and the
selected number of shapes s depends on its state. Call set.seed()
immediately before the fit to make results reproducible, and expect
different seeds to give somewhat different values of s.
A list of class c("hnethist", "nethist", "network_histogram")
(see network_histogram-class) with the following fields:
cluster an integer vector of length n with vertex-level block assignments from the initial nethist fit.
thetahat a k-by-k probability matrix of the selected hybrid model, where k is the number of nethist blocks.
rho_hat estimated sparsity parameter from the initial nethist fit.
normalized_LL normalized log-likelihood of the selected model, divided by the number of edges.
MSE mean squared error of the selected model.
method loss function used ("LSE" or "PLL").
h bandwidth used for the initial nethist fit.
blockcluster a kmeans object describing how the k-by-k blocks were merged into s shapes.
BIC BIC value of the selected model.
s number of distinct shapes in the selected model.
details list of all candidate models, one entry per number of shapes from 1 up to the maximum considered, each containing s, blockcluster, thetahat, MSE, normalized_LL, and BIC.
initial the nethist object used as the starting point for block clustering.
Verdeyme, A. & Olhede, S. C. (2024). Hybrid of Node and Link Communities for Graphon Estimation. arXiv:2401.05088
set.seed(42)
data(polblog)
hfit <- hnethist(polblog)
hfit
plot(hfit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.