Skip to content

fix: handle regularized no-link networks#374

Open
antoneri wants to merge 1 commit intomasterfrom
codex/issue-360-regularized-no-links
Open

fix: handle regularized no-link networks#374
antoneri wants to merge 1 commit intomasterfrom
codex/issue-360-regularized-no-links

Conversation

@antoneri
Copy link
Copy Markdown
Member

@antoneri antoneri commented Apr 2, 2026

Issue

Closes #360

Risk

high

Summary

  • use a uniform prior in regularized flow calculation when the network has no links, instead of deriving prior weights from 0/0 degree statistics
  • allow the existing one-level fallback to collapse prior-only regularized runs with zero links into a single top module
  • add a Python regression covering both directed and undirected regularized no-link runs

Verification

  • PATH="$PWD/.codex-bin:/opt/homebrew/bin:$PATH" CXXFLAGS="-I/opt/homebrew/opt/libomp/include" LDFLAGS="-L/opt/homebrew/opt/libomp/lib" make python
  • PATH="$PWD/.codex-bin:/opt/homebrew/bin:$PATH" python -m pytest test/test_flow.py -k regularized_no_links
  • PATH="/opt/homebrew/bin:$PATH" CXXFLAGS="-I/opt/homebrew/opt/libomp/include" LDFLAGS="-L/opt/homebrew/opt/libomp/lib" make -B

Residual Risk

  • This changes regularized behavior in a core edge case, so other prior-only or zero-link paths should still be watched for unintended partition fallback changes.

@antoneri antoneri marked this pull request as ready for review April 2, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regularized version gives relative codelength savings as nan if network has no links

1 participant