Skip to content

Initialize hemisphere particle filters on the manifold - #5345

Merged
FlorianPfaff merged 4 commits into
mainfrom
agent/fix-particle-filter-initialization
Aug 18, 2026
Merged

Initialize hemisphere particle filters on the manifold#5345
FlorianPfaff merged 4 commits into
mainfrom
agent/fix-particle-filter-initialization

Conversation

@FlorianPfaff

Copy link
Copy Markdown
Owner

What changed

  • Replace empty(...) particle locations in HyperhemisphericalParticleFilter with deterministic north-pole unit vectors.
  • Apply the same fix component-wise in HyperhemisphereCartProdParticleFilter.
  • Add regressions that verify the constructors produce the expected valid hemisphere directions.

Why

The constructors previously passed uninitialized memory directly to Dirac distributions. Dirac weight validation does not normalize particle locations, while downstream hemisphere moments and mean-axis calculations assume valid directional samples. Depending on backend and allocator state, the initial filter could therefore start from zero, arbitrary, or off-manifold particle locations.

Validation

  • Added constructor-level geometry regressions for both affected filters.
  • Changes are limited to initialization and its tests; later state-setting and prediction behavior is unchanged.

Created as a draft so repository CI can validate all supported backends before merge.

@github-actions

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 8.39s
✅ JSON prettier 7 0 0 0 0.72s
✅ JSON v8r 7 0 0 4.53s
✅ MARKDOWN markdownlint 68 0 0 0 2.08s
✅ MARKDOWN markdown-table-formatter 68 0 0 0 0.41s
✅ PYTHON black 1983 11 0 0 67.55s
✅ PYTHON isort 1983 21 0 0 3.01s
✅ REPOSITORY betterleaks yes no no 1.35s
✅ REPOSITORY checkov yes no no 37.5s
✅ REPOSITORY git_diff yes no no 0.13s
✅ REPOSITORY secretlint yes no no 108.45s
✅ REPOSITORY syft yes no no 3.8s
✅ REPOSITORY trivy-sbom yes no no 2.46s
✅ YAML prettier 11 0 0 0 0.85s
✅ YAML v8r 11 0 0 17.86s
✅ YAML yamllint 11 0 0 1.19s

Notices

⚠️ Your configuration references items that have been removed from MegaLinter and are ignored: MAKEFILE_CHECKMAKE. See Removed linters to find their replacements.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.0.0 --custom-flavor-setup --custom-flavor-linters PYTHON_BLACK,PYTHON_ISORT,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@FlorianPfaff
FlorianPfaff marked this pull request as ready for review August 18, 2026 19:15
@FlorianPfaff
FlorianPfaff merged commit 2d09985 into main Aug 18, 2026
15 of 26 checks passed
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.

1 participant