Draft
Fix duplicate covariance normalization in computeWassersteinDistanceGaussian#18
computeWassersteinDistanceGaussian#18Conversation
Co-authored-by: JokerJohn <25702851+JokerJohn@users.noreply.github.com> Agent-Logs-Url: https://github.com/JokerJohn/Cloud_Map_Evaluation/sessions/e3edb404-945e-4945-8ff8-63075fbf35ea
Copilot
AI
changed the title
[WIP] Fix unbiased estimator covariance matrix in computeWassersteinDistanceGaussian
Fix duplicate covariance normalization in Mar 22, 2026
computeWassersteinDistanceGaussian
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在
computeWassersteinDistanceGaussian中,协方差矩阵被再次除以(num_points - 1),与上游已完成的无偏估计处理重复,导致协方差被过度缩放。该 PR 去除重复归一化,保持 Wasserstein 距离使用已标准化的VoxelInfo::sigma。问题定位
VoxelInfo::sigma在 voxel 构建/熵计算流程中已做(n-1)归一化。(n-1),造成重复无偏处理。代码修改(最小变更)
map_eval/src/voxel_calculator.cppcomputeWassersteinDistanceGaussian(const VoxelInfo&, const VoxelInfo&)sigma1 = voxel1.sigma / (voxel1.num_points - 1);→sigma1 = voxel1.sigma;sigma2 = voxel2.sigma / (voxel2.num_points - 1);→sigma2 = voxel2.sigma;行为影响
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.