fix: issue #60 — W-Dist センチネル廃止し Gudhi の実 Wasserstein に統一 - #63
Merged
Merged
Conversation
空予測点群時の 999/99/9.99 早期 return を削除し、評価指標も同一経路で OT 距離を返す。 Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
評価用 W-Dist のセンチネル値(999/99/9.99)を廃止し、空予測(predicted inliers が空)も含めて Gudhi による H₁ 1-Wasserstein(および Bottleneck)距離の定義へ統一するPRです。tda_ml 内の評価指標計算が「定義可能な OT 距離」として一貫するようになります。
Changes:
compute_w_distance/compute_bottleneck_distanceの空点群時センチネル返却を削除し、Gudhi の距離計算に統一compute_recall_specificity_gmean_mcc_wdistからempty_pred_wdistを削除し、常にcompute_w_distance経由で算出- 空予測ケースの挙動を固定するテストを追加/更新
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_persistence.py | 空点群入力でも有限な Wasserstein/Bottleneck が返ること(センチネル非使用)をテスト追加 |
| tests/test_metrics.py | empty_pred_wdist を廃止し、空 inlier 予測時の W-Dist を compute_w_distance と一致させるようテスト更新 |
| tda_ml/persistence.py | Wasserstein/Bottleneck 距離の空点群センチネル処理を削除し、Gudhi 距離定義に統一 |
| tda_ml/metrics.py | W-Dist 計算を常に compute_w_distance に委譲し、センチネル引数を削除 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
999.0/99.0/9.99)を廃止し、空予測 inlier を含め Gudhi の H₁ 1-Wasserstein に統一upstream/main単独ブランチ(Follow-up: 正則化・安定化のための ad-hoc 微小正定数の要否をPR 54〜58 マージ後に再検証する #59 / PR fix: issue #59 — ad-hoc 微小正定数の整理と論文外モデリング床の削除 #62 とは分離)Changes
tda_ml/persistence.py: 空点群時の早期 return 削除(Wasserstein / Bottleneck)tda_ml/metrics.py:empty_pred_wdist削除、常にcompute_w_distance経由tests/test_persistence.py新規、tests/test_metrics.py更新Test plan
uv run pytest→ 46 passedtrainer/ 位相損失)は未変更 — MCC/G-Mean の再学習は不要REPRODUCIBILITY.mdに評価 W-Dist 定義を追記Closes #60
Made with Cursor