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.
Optionally (if fitness = TRUE
), bicm()
instead returns a list of row and column fitnesses, which is faster and
requires less memory. Given the ith row's fitness Ri and the jth column's fitness Rj, the entry Bij in the
matrix can be computed as Ri\*Rj/(1+(Ri\*Rj)).
Note: M cannot contain any rows or columns that contain all 0s or all 1s.
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