Skip to content

Introduce Hellinger distance as a metric#109

Open
DomFijan wants to merge 10 commits intomainfrom
feat/hillinger
Open

Introduce Hellinger distance as a metric#109
DomFijan wants to merge 10 commits intomainfrom
feat/hillinger

Conversation

@DomFijan
Copy link
Copy Markdown
Collaborator

@DomFijan DomFijan commented Mar 10, 2026

Description

Provide an alternative metric for neighborhood similarity which obeys triangle inequality.

Motivation and Context

Can be useful for certain analysis where OP distance should obey triangle inequality.

How Has This Been Tested?

Tests have been written.

Checklist:

@DomFijan DomFijan requested a review from janbridley March 10, 2026 16:28
@DomFijan DomFijan marked this pull request as ready for review March 10, 2026 19:05
spatula/pgop.py Outdated
optimizer: spatula.optimize.Optimizer,
mode: str = "full",
compute_per_operator_values_for_final_orientation: bool = False,
metric: str = "BC",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only note is I think this could be "hillinger" and "bhattacharyya", with typing.Literal it should autocomplete and it's more explicit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've implemented these changes - @DomFijan let me know if this works for you!

@janbridley janbridley changed the title Introduce Hillinger distance as a metric Introduce Hellinger distance as a metric Apr 3, 2026
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