Class for fitting a double-standard sampling
Source:R/R6Class-networkSampling_fit.R
doubleStandardSampling_fit.RdA dyad is observed with probability \(p_0\) if it is 0, \(p_1\) if it is 1 (the vector of parameters is \((p_0, p_1)\)). Given the blocks, a dyad between blocks q and l is missing with probability \(m_{ql} = \pi_{ql}(1 - p_1) + (1 - \pi_{ql})(1 - p_0)\): the missing dyads are integrated out given the blocks, and the posterior probability that a missing dyad between blocks q and l is an edge is \(\nu_{ql} = \pi_{ql}(1 - p_1) / m_{ql}\), a Q x Q matrix. The parameters are updated jointly with the connectivity of the SBM (see SimpleSBM_fit_doubleStandard): this class only stores them, with the terms of the sampling.
With a single block, \((\pi, p_0, p_1)\) are not identifiable: the observed data only inform \(\pi p_1\) and \((1 - \pi) p_0\). The fit is then constrained to \(p_0 = p_1\), that is, to dyad sampling, with one parameter.
Super classes
networkSampling -> networkSampling_fit -> networkSamplingDyads_fit -> doubleStandardSampling_fit
Active bindings
dfthe number of parameters: 2, or 1 with a single block (p0 = p1)
blockImputationQ x Q matrix, the posterior probability that a missing dyad between blocks q and l is an edge, with the current parameters
Methods
Inherited methods
doubleStandardSampling_fit$new()
constructor
Usage
doubleStandardSampling_fit$new(partlyObservedNetwork, blockInit, connectInit)doubleStandardSampling_fit$update_parameters()
stores the parameters, updated jointly with the connectivity of the SBM (see SimpleSBM_fit_doubleStandard), and the current blocks
doubleStandardSampling_fit$reorder()
permute the parameters indexed by the blocks, after the blocks of the SBM were permuted
doubleStandardSampling_fit$vExpec_at()
the variational expectation of the log-likelihood of the sampling at given memberships, the missing dyads being integrated out given the blocks: \(E_\tau[\log p(R \mid Y^o, Z)]\)
doubleStandardSampling_fit$log_lambda()
the term of the missing dyads in the update of the blocks: for each node i and block q, \(\sum_j \sum_l Z_{jl} \log m_{ql}\) over the missing dyads (i, j) (the observed dyads give a term that does not depend on the blocks)