bicm
estimates cell probabilities under the bipartite configuration model
bicm(M, fitness = FALSE, tol = 1e-08, max_steps = 200, ...)
a matrix of probabilities or a list of fitnesses
matrix: a binary matrix
boolean: FALSE returns a matrix of probabilities, TRUE returns a list of row and column fitnesses only
numeric, tolerance of algorithm
numeric, number of times to run loglikelihood_prime_bicm algorithm
optional arguments
Given a binary matrix M, the Bipartite Configuration Model (BiCM; Saracco et. al. 2015) returns a valued matrix
B in which Bij is the approximate probability that Mij = 1 in the space of all binary matrices with
the same row and column marginals as M. The BiCM yields the closest approximations of the true probabilities
compared to other estimation methods (Neal et al., 2021), and is used by sdsm()
to extract the backbone of
a bipartite projection using the stochastic degree sequence model.
Matrix M is "conforming" if no rows and no columns contain only zeros or only ones. If M is conforming, then
bicm()
is faster. Additionally, if fitness = TRUE
, then bicm()
returns a list of row and column fitnesses,
which requires less memory. Given the ith row's fitness Ri and the jth column's fitness Rj, the entry Bij in
the probability matrix can be computed as Ri x Rj/(1+(Ri x Rj)).
Matrix M is "non-conforming" if any rows or any columns contain only zeros or only ones. If M is non-conforming,
then bicm()
is slower and will only return a probability matrix.
package: Neal, Z. P. (2022). backbone: An R Package to Extract Network Backbones. PLOS ONE, 17, e0269137. tools:::Rd_expr_doi("10.1371/journal.pone.0269137")
bicm: Saracco, F., Di Clemente, R., Gabrielli, A., & Squartini, T. (2015). Randomizing bipartite networks: The case of the World Trade Web. Scientific Reports, 5, 10595. tools:::Rd_expr_doi("10.1038/srep10595")
M <- matrix(c(0,0,1,0,1,0,1,0,1),3,3) #A binary matrix
bicm(M)
Run the code above in your browser using DataLab