Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newmetric: ProcrustesDisparity #2723

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Sep 7, 2024

What does this PR do?

Fixes #2691

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃


📚 Documentation preview 📚: https://torchmetrics--2723.org.readthedocs.build/en/2723/

@SkafteNicki SkafteNicki added this to the v1.5.0 milestone Sep 7, 2024
@SkafteNicki SkafteNicki self-assigned this Sep 7, 2024
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 7, 2024
@SkafteNicki SkafteNicki changed the title Newmetric: `ProcrustesDisparity" Newmetric: ProcrustesDisparity Sep 7, 2024
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 69%. Comparing base (748caee) to head (ce3665f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #2723   +/-   ##
======================================
  Coverage      69%     69%           
======================================
  Files         329     334    +5     
  Lines       18077   18143   +66     
======================================
+ Hits        12499   12557   +58     
- Misses       5578    5586    +8     

src/torchmetrics/functional/shape/procrustes.py Outdated Show resolved Hide resolved
src/torchmetrics/functional/shape/procrustes.py Outdated Show resolved Hide resolved


def procrustes_disparity(
dataset1: Tensor, dataset2: Tensor, return_all: bool = False
Copy link
Member

Choose a reason for hiding this comment

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

just wondering if we should rename the arguments from dataset but not sure about a better name...

src/torchmetrics/functional/shape/procrustes.py Outdated Show resolved Hide resolved
src/torchmetrics/shape/procrustes.py Outdated Show resolved Hide resolved

The metric works similar to `scipy.spatial.procrustes` but for batches of data points. The disparity is
aggregated over the batch, thus to get the individual disparities please use the functional version of this
metric: ``torchmetrics.functional.shape.procrustes.procrustes_disparity``.
Copy link
Member

Choose a reason for hiding this comment

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

is this single of `?

Copy link
Member

Choose a reason for hiding this comment

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

well I mean shall it be rather cross-ref then just plain code?

@mergify mergify bot added the ready label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation New metric ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

procrustes alignment
2 participants