Package: sbm 1.0.0.9000

Julien Chiquet

sbm: Stochastic Blockmodels

A collection of tools and functions to adjust a variety of stochastic blockmodels (SBM). Supports at the moment Simple, Bipartite, 'Multipartite' and Multiplex SBM (undirected or directed with Bernoulli, Poisson or Gaussian emission laws on the edges). For Simple and Bipartite SBM, covariates can be given on the edges, or on the nodes to drive the block memberships, and the network may contain missing values. See Léger (2016) <doi:10.48550/arXiv.1602.07587>, 'Barbillon et al.' (2020) <doi:10.1111/rssa.12193> and 'Bar-Hen et al.' (2022) <doi:10.1177/1471082X20963254>.

Authors:Julien Chiquet [aut, cre], Sophie Donnet [aut], Pierre Barbillon [aut], Louis Lacoste [aut], Jean-Benoist Leger [ctb], Julie Aubert [ctb], großBM team [ctb]

sbm_1.0.0.9000.tar.gz
sbm_1.0.0.9000.zip(r-4.7-x86_64)sbm_1.0.0.9000.zip(r-4.7-arm64)sbm_1.0.0.9000.zip(r-4.6-x86_64)sbm_1.0.0.9000.zip(r-4.6-arm64)sbm_1.0.0.9000.zip(r-4.5-x86_64)
sbm_1.0.0.9000.tgz(r-4.6-x86_64)sbm_1.0.0.9000.tgz(r-4.6-arm64)sbm_1.0.0.9000.tgz(r-4.5-x86_64)sbm_1.0.0.9000.tgz(r-4.5-arm64)
sbm_1.0.0.9000.tar.gz(r-4.7-arm64)sbm_1.0.0.9000.tar.gz(r-4.7-x86_64)sbm_1.0.0.9000.tar.gz(r-4.6-arm64)sbm_1.0.0.9000.tar.gz(r-4.6-x86_64)
sbm_1.0.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
sbm/json (API)

# Install 'sbm' in R:
install.packages('sbm', repos = c('https://grosssbm.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/grosssbm/sbm/issues

Pkgdown/docs site:https://grosssbm.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

network-analysissbmstochastic-block-modelquartocpp

9.16 score 17 stars 3 packages 132 scripts 1.0k downloads 24 exports 60 dependencies

Last updated from:9c49bb9bb9. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK258
linux-devel-x86_64OK258
source / vignettesOK330
linux-release-arm64OK261
linux-release-x86_64OK258
macos-release-arm64OK406
macos-release-x86_64OK431
macos-oldrel-arm64OK350
macos-oldrel-x86_64OK372
windows-devel-arm64OK361
windows-devel-x86_64OK326
windows-release-arm64OK412
windows-release-x86_64OK284
windows-oldrel-x86_64OK288
wasm-releaseOK131

Exports:%>%BipartiteSBMBipartiteSBM_fitdefineSBMestimateBipartiteSBMestimateMultipartiteSBMestimateMultiplexSBMestimateSimpleSBMis_SBMMultipartiteSBMMultipartiteSBM_fitMultiplexSBM_fitplotAlluvialplotMyGraphonplotMyMatrixplotMyMultipartiteMatrixplotMyMultiplexMatrixplotMyParameterssampleBipartiteSBMsampleMultipartiteSBMsampleMultiplexSBMsampleSimpleSBMSimpleSBMSimpleSBM_fit

Dependencies:alluvialaricodeblockmodelsclicodetoolscpp11crayondata.tablediagramdigestdplyrfarverfuturefuture.applygenericsggplot2globalsglueGREMLINSgtablehmsigraphisobandKernSmoothlabelinglatticelavalifecyclelistenvmagrittrMatrixnumDerivparallellypillarpkgconfigplyrprettyunitsprodlimprogressprogressrpurrrR6RColorBrewerRcppRcppArmadilloreshape2rlangS7scalesshapeSQUAREMstringistringrsurvivaltibbletidyselectutf8vctrsviridisLitewithr

Multipartite Stochastic Block Models
1. Preliminaries | 2. Dataset | 2.1 Description of the data | 2.2 Formatting the data | 3. Multipartite SBM | 3.1 Mathematical background | 3.2 Inference | 4. Plots | References

Last update: 2026-11-24
Started: 2026-11-06

Simple and Bipartite Stochastic Block Models
1. Preliminaries | 1.1 Requirements | 1.2 Data set: antagonistic tree/fungus interaction network | 1.3 Mathematical Background | 2. Analysis of the tree/tree data | 2.1 Tree-tree binary interaction networks | The Bernoulli SBM | About model selection and choice of the number of blocks | 2.2 Analysis of the weighted interaction network | The Poisson SBM | Comparison of the binary and weighted clusterings | 2.3 Introduction of covariates | The Poisson SBM with covariates on the edges | 3. Analysis of the tree/fungi data | The bipartite SBM | References

Last update: 2026-11-24
Started: 2026-11-06

Stochastic Block Models for Multipartite networks: principle
1. Preliminaries | 2. Multipartite networks | 3. Stochastic Block Models for multipartite networks | 3.1 The model | The multipartite SBM | 3.2 Inference | 4. Data simulation | 5. Estimation with selection of the numbers of blocks | 6. Estimation for given numbers of blocks | 7. Initial clustering | 8. Missing data | 9. Parallel computing | References

Last update: 2026-11-24
Started: 2026-11-24

Stochastic Block Models for Multiplex networks: application
1. Preliminaries | 2. Data set | 2.1 Description of the data | 2.2 Data manipulation | 3. Multiplex SBM with independent layers | The multiplex SBM with independent layers | 4. Multiplex SBM with dependent layers | The multiplex SBM with dependent layers | References

Last update: 2026-11-24
Started: 2026-11-06

Stochastic Block Models: principle and illustration
1. Introduction | 2. The Stochastic Block Model | 2.1 Simple SBM | The simple SBM | 2.2 Bipartite SBM | The bipartite SBM | Extensions | 3. A gallery of network structures | 3.1 Communities | 3.2 Core and periphery | 3.3 Disassortative structure | 3.4 Hierarchy in a directed network | 3.5 Count and weighted networks | 3.6 Bipartite networks | 4. Inference | 4.1 Estimation and model selection | 4.2 Fitting a simulated network | 5. The plots of the package | The expected value of each edge | References

Last update: 2026-11-24
Started: 2026-11-06

Stochastic Block Models with covariates on nodes
1. Introduction | 2. Simple SBM with covariates on nodes | 2.1 The model | The case with no covariates | 2.2 Model selection: the ICL | 2.3 Simulation of a directed network | 2.4 Estimation by VEM | Intercept | 2.5 Estimated effects of the covariates | Label switching | 2.6 Are the covariates selected? | What the ICL selects | 2.7 Gain in clustering | 2.8 Testing the effect of covariates with the ICL | 3. Bipartite SBM with covariates on nodes | 3.1 The model | 3.2 Simulation | 3.3 Missing data | Missing data in SBM | 3.4 Estimation and gain in clustering | 3.5 Covariates on one type of nodes only | References

Last update: 2026-11-10
Started: 2026-11-06

Stochastic Block Models for Multiplex networks: principle
1. Preliminaries | 2. Multiplex network data | 3. Stochastic Block models for multiplex networks | 3.1 General formulation of the model | The multiplex SBM | 3.2 Dependent and independent layers conditionally to $Z$ | The multiplex SBM with independent layers | 3.3 Bipartite multiplex networks | The bipartite multiplex SBM | 3.4 Inference | 4. Data simulation | 4.1 Two independent directed layers: one Bernoulli, one Poisson, two clusters | 4.2 Two dependent bipartite Gaussian layers: three row clusters, two column clusters | 4.3 Two dependent directed Bernoulli layers: two clusters | 5. Inference | 5.1 Two independent directed layers: one Bernoulli, one Poisson | 5.2 Two dependent bipartite Gaussian layers | 5.3 Two dependent directed Bernoulli layers | References

Last update: 2026-11-06
Started: 2026-11-06

Readme and manuals

Help Manual

Help pageTopics
R6 class for Bipartite SBMBipartiteSBM
R6 Class definition of an Bipartite SBM fitBipartiteSBM_fit
Extract model coefficientscoef.SBM
Define a networkdefineSBM
Estimation of Bipartite SBMsestimateBipartiteSBM
Estimation for multipartite SBMestimateMultipartiteSBM
Estimation for Multiplex SBMestimateMultiplexSBM
Estimation of Simple SBMsestimateSimpleSBM
Extract model fitted valuesfitted.SBM
fungus-tree interaction networkfungusTreeNetwork
Auxiliary function to check the given class of an objectis_SBM
Ecological multipartite interaction networkmultipartiteEcologicalNetwork
R6 Class definition of a Multipartite SBMMultipartiteSBM
R6 Class definition of a Multipartite SBM fitMultipartiteSBM_fit
R6 Class definition of a Multiplex SBM fitMultiplexSBM_fit
SBM Plotplot.SBM
Plot an alluvial plot between clusteringsplotAlluvial
Plot the graphon of a Stochastic Block ModelplotMyGraphon
Plot an adjacency or incidence MatrixplotMyMatrix
Plot the matrices corresponding to a Multipartite NetworkplotMyMultipartiteMatrix
Plot the matrices corresponding to a Multiplex NetworkplotMyMultiplexMatrix
Plot the parameters of a Stochastic Block ModelplotMyParameters
Model Predictionspredict.SBM
Sampling of Bipartite SBMssampleBipartiteSBM
Sampling of Multipartite SBMssampleMultipartiteSBM
Sampling of Multiplex SBMssampleMultiplexSBM
Sampling of Simple SBMssampleSimpleSBM
R6 virtual class for SBM representation (mother class of SimpleSBM, BipartiteSBM, MultipartiteSBM)SBM
R6 class for Simple SBMSimpleSBM
R6 Class definition of a Simple SBM fitSimpleSBM_fit
War data setwar