graphInference {noisySBM} | R Documentation |
new graph inference procedure
Description
new graph inference procedure
Usage
graphInference(
dataMatrix,
nodeClustering,
theta,
alpha = 0.05,
modelFamily = "Gauss"
)
Arguments
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:
|
Details
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).
Value
a list with:
A
resulting binary adjacency matrix
qvalues
vector with conditional q-values in the noisy stochastic block model
Examples
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
[Package noisySBM version 0.1.4 Index]