Initialize hyperhemispherical particle filter on valid manifold points - #5342
Initialize hyperhemispherical particle filter on valid manifold points#5342FlorianPfaff wants to merge 2 commits into
Conversation
✅MegaLinter analysis: Success
Notices
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
|
|
Correction: the earlier triage note was based on stale/mismatched PR metadata. This PR is the valid-manifold initialization fix for |
|
Closing as superseded by #5345, which fixes the same |

Summary
HyperhemisphericalParticleFilterwith deterministic unit vectors at the upper-hemisphere north pole instead of uninitialized memoryBug
HyperhemisphericalParticleFilter.__init__()constructed its initialHyperhemisphericalDiracDistributionfromempty((n_particles, dim + 1)). On NumPy/PyTorch this can expose arbitrary allocator contents; on backends that zero-fillempty, it produces zero vectors. Neither is a valid deterministic point set on the unit hyperhemisphere, so a freshly constructed filter can start with off-manifold or non-finite particle locations before a caller assigns a prior.The neighboring
HypersphericalParticleFilteralready avoids this by initializing with valid sphere points.Fix
Initialize all particles at the north pole
[0, ..., 0, 1]. This is deterministic, has unit norm, and is in the upper hemisphere for every supported dimension.Validation
mainand changes only the filter constructor plus its existing test module