Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
0391c13
Adding nodes_covariates to scalar_model
Polarolouis Feb 18, 2026
12c3827
Various checks added to nodes_covariates
Polarolouis Feb 18, 2026
52bc01e
Adding nodes covariates to all memberships in R
Polarolouis Feb 19, 2026
6e3c6bc
Providing the nodes covariates in the model (default to NULL without …
Polarolouis Feb 19, 2026
3c1f9e5
Transmitting covariates
Polarolouis Feb 19, 2026
6f865b5
Receiving covariates and resending in cpp
Polarolouis Feb 19, 2026
1880aec
Fixing error message
Polarolouis Feb 19, 2026
78abb35
Fixing text
Polarolouis Feb 19, 2026
76805b6
Fixing text
Polarolouis Feb 19, 2026
ea940f4
R handling of nodes covariates
Polarolouis Feb 19, 2026
863290d
Handling nodes covariates
Polarolouis Feb 19, 2026
a47ccf9
Adding an overloaded assignment operator for LBM in C++
Polarolouis Feb 19, 2026
0ffdba3
Saving default non auto format for C++ and R files
Polarolouis Feb 19, 2026
b6d63a3
Implemented LogSumExp, softmax for rowvec and softmax_mat
Polarolouis Feb 20, 2026
ee35fa5
Add cpp function necessaries for nodes covariates models
Polarolouis Feb 24, 2026
fd28d99
Removing wrong softmax_mat
Polarolouis Feb 24, 2026
1cb5ff0
Removing message to stdout
Polarolouis Feb 24, 2026
b1826cf
In from_cc accepting covariates
Polarolouis Feb 24, 2026
d09614a
Adding inits for LBM prior probabilities
Polarolouis Feb 24, 2026
cc93853
Removing Rcout
Polarolouis Feb 24, 2026
c92e3b2
Added optimization in LBM prior probabilities
Polarolouis Feb 24, 2026
21eb50c
Formatting C++
Polarolouis Feb 25, 2026
52a89a8
LBM R : using length to detect nullity
Polarolouis Feb 25, 2026
7fee7b9
Ensuring covariates are non empty
Polarolouis Feb 25, 2026
6a43d82
Formatting and passing memberships
Polarolouis Feb 25, 2026
5a389cf
Full membership is passed
Polarolouis Feb 25, 2026
19ac381
Fixing numbering of non parallel jobs
Polarolouis Feb 25, 2026
0d2fb5e
Removing introduced attributes
Polarolouis Feb 26, 2026
dfad97a
Passing covariates in splits
Polarolouis Feb 26, 2026
9cf4f13
Fixing sequences
Polarolouis Feb 26, 2026
ac856ae
Handling in C++ the nodes_covariates optimization
Polarolouis Feb 27, 2026
aabb911
Implementing nodes covariates in R memberships
Polarolouis Feb 27, 2026
8b91f08
Adding check for the name of nodes covariates for SBM
Polarolouis Feb 27, 2026
4aca740
Fixing various empty calls options
Polarolouis Feb 27, 2026
95d9231
Using BFGS instead of only gradient descent
Polarolouis Feb 27, 2026
1459643
Accumulating only diag(Z * log(alphamat)^T) the relevant values
Polarolouis Feb 27, 2026
1323f52
Adding launch.json in .vscode for R debugging
Polarolouis Feb 27, 2026
ec190a9
Adding testthat tests to blockmodels
Polarolouis Feb 27, 2026
7e4102f
Adding nodes covariates to multivariate model
Polarolouis Feb 28, 2026
b6ef4e7
Fixing class test replacing by inherits
Polarolouis Feb 28, 2026
65b123a
Adding test with nodes covariates
Polarolouis Feb 28, 2026
3e43cf0
Adding .vscode and dev to .Rbuildignore
Polarolouis Feb 28, 2026
613e606
Added warning if convergence did not occur for nodes covariates
Polarolouis Mar 2, 2026
06e3d9e
Fixing BFGS check to use it
Polarolouis Mar 2, 2026
dd2a39a
Using config defined constants
Polarolouis Mar 5, 2026
95b938d
Clamping alpha mat to prevent log errors for lZ and log(alpha) lines
Polarolouis Mar 5, 2026
01d4629
Adding various warning around infinite quantities in BFGS
Polarolouis Mar 5, 2026
4a4d27c
Adding documentation for nodes covariates
Polarolouis Mar 5, 2026
2152168
Incrementing minor version and adding Louis Lacoste as author
Polarolouis Mar 5, 2026
b579592
Adding Github Action for CI check
Polarolouis Mar 5, 2026
5c5abd4
Merge branch 'master' into dev/covar_memberships
Polarolouis Jul 21, 2026
3bbd156
Adding test coverage CI with codecov
Polarolouis Mar 5, 2026
2d6b0dd
Adding a README
Polarolouis Mar 5, 2026
a762aa1
Updating date in DESCRIPTION
Polarolouis Mar 5, 2026
4cc4acc
Removing Rcpp::LdFlags() as it's no more needed
Polarolouis Mar 5, 2026
a3eda80
Adding pkgdown doc
Polarolouis Mar 5, 2026
a7b2cf0
Adding README.Rmd and CI
Polarolouis Mar 6, 2026
a15d0e3
Adding CRAN status badge to README.Rmd
Polarolouis Mar 6, 2026
0226389
Do not use renv in Render Rmd
Polarolouis Mar 6, 2026
96b30b7
Using correct branch for Codecov
Polarolouis Mar 6, 2026
2a19986
Using Rmarkdown in CI render
Polarolouis Mar 6, 2026
cb22d01
Updating author field to Author@R
Polarolouis Mar 5, 2026
53c8bd9
Adding end newline to some header C++ files
Polarolouis Mar 5, 2026
b35b5d7
Change test coverage
Polarolouis Mar 5, 2026
2f7c39c
Modify test-coverage ci
Polarolouis Mar 5, 2026
ad169c4
Using secret correctly
Polarolouis Mar 5, 2026
f02a3c3
Adding debug step for CI test-coverage
Polarolouis Mar 6, 2026
a270be8
Removing disable search
Polarolouis Mar 6, 2026
8d51292
Updating render-rmarkdown dependencies setup
Polarolouis Mar 6, 2026
0918019
Changing name of SBM nodes covariates
Polarolouis Mar 6, 2026
9d123a9
Adding some devfiles
Polarolouis Mar 9, 2026
35fc059
Adding explicit compute of B
Polarolouis Mar 9, 2026
5de6780
Using the explicit compute B function
Polarolouis Mar 9, 2026
3f39f1d
Various experiment in dev files
Polarolouis Mar 9, 2026
a580c20
Using BFGS to optimize with approximation for init
Polarolouis Mar 16, 2026
110064e
Fiddling with retrieved values
Polarolouis Mar 16, 2026
556fec0
Add beta bench
Polarolouis Mar 18, 2026
f496bd7
One cov with identif on alpha
Polarolouis Mar 19, 2026
674197c
Change name
Polarolouis Mar 19, 2026
1cf7bbb
Benchmarking for Beta recovery
Polarolouis Mar 20, 2026
ee61675
More plots
Polarolouis Mar 20, 2026
fe03d2a
Handling NA in scalar_model.R
Polarolouis Mar 19, 2026
c868666
Adding a mask compute function C++
Polarolouis Mar 19, 2026
0cf4f31
passing na replace value to C++
Polarolouis Mar 19, 2026
b0e6da0
Adding replace missing values
Polarolouis Mar 19, 2026
7f0cbac
Handling NAs
Polarolouis Mar 19, 2026
6150ce4
test case for NAs
Polarolouis Mar 19, 2026
12f30f7
Adding Rcpp to handle errors
Polarolouis Mar 19, 2026
44e930d
Uncommenting tryCatch
Polarolouis Mar 19, 2026
8c39b41
Adding tests for NA handling
Polarolouis Mar 19, 2026
bdc7d2c
Removing missplaced devtools::load_all()
Polarolouis Mar 19, 2026
da77ad8
Adding newline
Polarolouis Mar 19, 2026
59030d5
Beginning benchmark
Polarolouis Mar 19, 2026
90894f4
Add NEWS.md
Polarolouis Mar 19, 2026
fc6e5fa
Using na_replace_value to check that it does not impact the result an…
Polarolouis Mar 19, 2026
5f9f0ec
Adding NA support
Polarolouis Mar 30, 2026
54f473b
Adding NA testing
Polarolouis Mar 30, 2026
25711a6
Reverting NA handling to reimplement it properly
Polarolouis Mar 30, 2026
aacf0a1
Reimplementing masking of bernoulli for NAs
Polarolouis Mar 30, 2026
8a8820c
Reimplementing NA handling for poisson and gaussian models
Polarolouis Mar 31, 2026
dbde672
Mask is checked as non zero when built and not per model
Polarolouis Mar 31, 2026
1a990f0
All covariates models now handle NAs
Polarolouis Mar 31, 2026
3224143
Naive Bernoulli handles NAs
Polarolouis Mar 31, 2026
e1ed6f2
Integrating NA handling tests to main test files
Polarolouis Apr 1, 2026
96c9754
Restoring to bernoulli_covariates_fast own test file
Polarolouis Apr 1, 2026
ec1dc11
Updating NEWS
Polarolouis Apr 1, 2026
bedb613
Adding test to ensure all memberships pass covariates and scalar mode…
Polarolouis Apr 3, 2026
1837da5
Fix SBM_sym not passing memberships
Polarolouis Apr 3, 2026
48f75a1
Removing .vscode folder from tracking
Polarolouis Jul 22, 2026
c627822
Updating checkout@v6
Polarolouis Jul 22, 2026
888332e
Cleaning up dev files
Polarolouis Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ HOWTO_WRITE_A_MODEL
mkpkg$
orig$
LICENSE
.vscode
dev
^\.github$
^_pkgdown\.yml$
^docs$
^pkgdown$
^README\.Rmd$
49 changes: 49 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
release:
types: [published]
workflow_dispatch:

name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
40 changes: 40 additions & 0 deletions .github/workflows/render-rmarkdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths: ["**.Rmd"]

name: render-rmarkdown.yaml

permissions: read-all

jobs:
render-rmarkdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v1
with:
cache-version: 4
extra-packages: rmarkdown

- name: Render Rmarkdown files and Commit Results
run: |
RMD_PATH=($(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '[.]Rmd$'))
Rscript -e 'for (f in commandArgs(TRUE)) if (file.exists(f)) rmarkdown::render(f)' ${RMD_PATH[*]}
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git commit ${RMD_PATH[*]/.Rmd/.md} -m 'Re-build Rmarkdown files' || echo "No changes to commit"
git push origin || echo "No changes to commit"
70 changes: 70 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:

name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov, filename = "cobertura.xml")
#covr::codecov(coverage=cov)
shell: Rscript {0}

- name: Debug files
run: |
pwd
ls -lah
find . -name "*.xml"

- uses: codecov/codecov-action@v5
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
files: ./cobertura.xml
plugins: noop
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.*.swp
.*.swo
.Rproj.user
docs
.vscode
15 changes: 11 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ Package: blockmodels
Type: Package
Title: Latent and Stochastic Block Model Estimation by a 'V-EM'
Algorithm
Version: 1.1.5
Date: 2021-12-01
Author: Jean-Benoist Leger <jbleger@hds.utc.fr>, Pierre Barbillon <pierre.barbillon@agroparistech.fr>, Julien Chiquet <julien.chiquet@inrae.fr>
Maintainer: Jean-Benoist Leger <jbleger@hds.utc.fr>
Version: 1.2.1
Date: 2026-03-05
Description: Latent and Stochastic Block Model estimation by a Variational EM algorithm.
Various probability distribution are provided (Bernoulli,
Poisson...), with or without covariates.
Expand All @@ -18,6 +16,15 @@ Imports:
parallel,
methods,
digest
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
Encoding: UTF-8
URL: https://github.com/jb-leger/blockmodels
BugReports: https://github.com/jb-leger/blockmodels/issues
Authors@R: c(
person("Jean-Benoist", "Leger", , "jbleger@hds.utc.fr", role = c("aut", "cre")),
person("Pierre", "Barbillon", , "pierre.barbillon@agroparistech.fr", role = "aut"),
person("Julien", "Chiquet", , "julien.chiquet@inrae.fr", role = "aut"),
person("Louis", "Lacoste", , "louis.lacoste@inrae.fr", role = "aut")
)
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# blockmodels 1.2.1

* Beginning adding handling of `NA` values in the data. Only scalar (with or without covariates) bernoulli, poisson and gaussian emission distribution models are supported for now. The `NA` values are ignored in the likelihood calculations, and the corresponding entries in the data are not used to update the parameters of the model.
* Added a `NEWS.md` file to track changes to the package.
Loading
Loading