graphInference: new graph inference procedure

Description Usage Arguments Details Value Examples

View source: R/testProcedure.R

Description

new graph inference procedure

Usage

1
2
3
4
5
6
7
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: Gauss and Gamma

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

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

noisySBM documentation built on Dec. 16, 2020, 5:09 p.m.