Skip to content

Fix duplicate weighting in ROD geometric median - #746

Open
Himerometra wants to merge 1 commit into
yzhao062:masterfrom
Himerometra:fix/rod-geometric-median-weights
Open

Himerometra wants to merge 1 commit into
yzhao062:masterfrom
Himerometra:fix/rod-geometric-median-weights

Conversation

@Himerometra

Copy link
Copy Markdown

Preserve sample multiplicities when calculating the geometric median in ROD. Deduplicating the input without retaining counts changes the minimization problem; for example, [0, 0, 0, 10, 20] incorrectly has the same median as [0, 10, 20].

Retain counts in the initialization and modified Weiszfeld updates. Add regression coverage for duplicates, translation, input order and degenerate inputs. Validation: 31 tests passed, including the existing ROD tests. Prepared with AI assistance and pending human review. No issue has been created yet.

Co-authored-by: Codex <noreply@openai.com>
@yzhao062

Copy link
Copy Markdown
Owner

Thank you for the analysis. On bundled data, weighting the geometric median by duplicate counts lowered ROD accuracy where duplicates are common. On cardio, ROC AUC fell from the 0.935 to 0.953 range to the 0.890 to 0.923 range, and average precision dropped by about 0.10. On shuttle, average precision dropped by 0.06 to 0.23 (3 to 5 seeds, one environment). These runs did not compare against the reference ROD code, so the deduplication may match it. I want to settle the reference-direction question in #726 first, and this pull request stays open until then.

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.

2 participants