"random", "hub", "clique" or "band".huge.generator(n = 200, d = 50, graph = "random", v = NULL, u = NULL,
g = NULL, prob = 0.03, vis = FALSE, verbose = TRUE)"random", "hub", "clique" and "band".u. The default value is 0.1 for "band" and 0.3 for "random", "hub", 0 for "clique" and 1 for "rando"clique" or "hub" graph, g is the number of hubs or cliques in the graph: when "graph = hub" default value is about d/8 if d >= 16 and 2 if d<16< code="">; w16<>"random".FALSEverbose = FALSE, tracing information printing is disabled. The default value is TRUE.n by d matrix for the generated datatheta, the graph patterns are generated as below:
(I) "random": Each pair of off-diagonal elements are randomly set theta[i,j]=theta[j,i]=1 for i!=j with probability "prob", and 0 other wise. It results in about d(d-1)prob/2 edges in the graph.
(II)"hub":The row/columns are evenly partitioned into g disjoint groups. Each group is associated with a "center" row i in that group. Each pair of off-diagonal elements are set theta[i,j]=theta[j,i]=1 for i!=j if j also belongs to the same group as i and 0 otherwise. It results in d - g edges in the graph.
(III)"clique":The row/columns are evenly partitioned into g disjoint groups. Each pair of off-diagonal elements are set theta[i,j]=theta[j,i]=1 for i!=j if both i and j belong to the same group, and 0 other wise. It results in about g(d/g)(d/g-1)/2 edges in the graph.
(IV)"band": The off-diagonal elements are set to be theta[i,j]=1 if 1<=|i-j|<=g< code=""> and 0 other wise. It results in (2d-1-g)g/2 edges in the graph.
The adjacency matrix theta has all diagonal elements equal to 0. To obtain a positive definite precision matrix, the smallest eigenvalue of theta*v is computed. Suppose e be the smallest eigenvalue and we let the precision matrix equals theta*v+(|e|+0.01+t)I. The covariance matrix is then computed to generate multivariate normal data.=|i-j|<=g<>huge and huge-package# band graph with bandwidth 3
L = huge.generator(n = 500, graph = "band", g = 3)
summary(L)
plot(L)
# random sparse graph
L = huge.generator(prob = 0.05, vis = TRUE)
# random dense graph
L = huge.generator(prob = 0.3, vis = TRUE)
# hub graph with 4 hubs
L = huge.generator(graph = "hub", g = 4, vis = TRUE)Run the code above in your browser using DataLab