Description Usage Arguments Details Value Examples
View source: R/testProcedure.R
new graph inference procedure
1 2 3 4 5 6 7 | graphInference(
dataMatrix,
nodeClustering,
theta,
alpha = 0.05,
modelFamily = "Gauss"
)
|
dataMatrix |
observed adjacency matrix, nxn matrix |
nodeClustering |
n-vector of hard node Clustering |
theta |
parameter of the noisy stochastic block model |
alpha |
confidence level |
modelFamily |
probability distribution for the edges. Possible values:
|
graph inference procedure based on conditional q-values in the noisy stochastic block model. It works in the Gaussian model, and also in the Gamma model, but only if the shape parameters of the Gamma distributions under the null and the alternatives are identical (e.g. when all distributions are exponentials).
a list with:
A
resulting binary adjacency matrix
qvalues
vector with conditional q-values in the noisy stochastic block model
1 2 3 4 5 6 7 | set.seed(1)
theta <- list(pi=c(.5,.5), w=c(.8,.1,.2), nu0=c(0,1), nu=matrix(c(-1,5,10, 1,1,1), ncol=2))
obs <- rnsbm(n=30, theta)
# res_gauss <- fitNSBM(obs$dataMatrix, nbCores=1)
resGraph <- graphInference(obs$dataMatrix, res_gauss[[2]]$clustering, theta, alpha=0.05)
sum((resGraph$A))/2 # nb of derived edges
sum(obs$latentAdj)/2 # correct nb of edges
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.