An S4 class to represent a Degree Corrected Stochastic Block Model. Such model can be used to cluster graph vertex, and model a square adjacency matrix \(X\) with the following generative model : $$ \pi \sim Dirichlet(\alpha)$$ $$ Z_i \sim \mathcal{M}(1,\pi)$$ $$ \theta_{kl} \sim Exponential(p)$$ $$ \gamma_i^+,\gamma_i^- \sim \mathcal{U}(S_k)$$ $$ X_{ij}|Z_{ik}Z_{jl}=1 \sim \mathcal{P}(\gamma_i^+\theta_{kl}\gamma_j^-)$$ The individuals parameters \(\gamma_i^+,\gamma_i^-\) allow to take into account the node degree heterogeneity. These parameters have uniform priors over the simplex \(S_k\) ie. \(\sum_{i:z_{ik}=1}\gamma_i^+=1\). These classes mainly store the prior parameters value \(\alpha,p\) of this generative model. The DcSbm-class must be used when fitting a simple Degree Corrected Stochastic Block Model whereas the DcSbmPrior-class must be used when fitting a CombinedModels-class.

DcSbmPrior(p = NaN, type = "guess")

DcSbm(alpha = 1, p = NaN, type = "guess")

Arguments

p

Exponential prior parameter (default to NaN, in this case p will be estimated from data as the mean connection probability)

type

define the type of networks (either "directed", "undirected" or "guess", default to "guess")

alpha

Dirichlet prior parameter over the cluster proportions (default to 1)

Value

a DcSbmPrior-class object a DcSbm-class object

Examples

DcSbmPrior()
#> An object of class "DcSbmPrior"
#> Slot "type":
#> [1] "guess"
#> 
#> Slot "p":
#> [1] NaN
#> 
DcSbmPrior(type = "undirected")
#> An object of class "DcSbmPrior"
#> Slot "type":
#> [1] "undirected"
#> 
#> Slot "p":
#> [1] NaN
#> 
DcSbm()
#> An object of class "DcSbm"
#> Slot "alpha":
#> [1] 1
#> 
#> Slot "type":
#> [1] "guess"
#> 
#> Slot "p":
#> [1] NaN
#> 
DcSbm(type = "undirected")
#> An object of class "DcSbm"
#> Slot "alpha":
#> [1] 1
#> 
#> Slot "type":
#> [1] "undirected"
#> 
#> Slot "p":
#> [1] NaN
#>