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

Fixed graph matching with similarity matrix of unequal dimensions #1002

Merged
merged 11 commits into from
Dec 8, 2022

Conversation

dokato
Copy link
Contributor

@dokato dokato commented Dec 5, 2022

  • Does this PR have a descriptive title that could go in our release notes?
  • Does this PR add any new dependencies? No
  • Does this PR modify any existing APIs? No
    • Is the change to the API backwards compatible?
  • Have you built the documentation (reference and/or tutorial) and verified the generated documentation is appropriate?

Reference Issues/PRs

Fixes #1001.

What does this implement/fix? Briefly explain your changes.

  • I add padding to the similarity matrix S, so the following _compare_dimensions checks are passing.
  • Also fixes a small error with auto doc generation from an upstream dependency.

@dokato dokato requested a review from bdpedigo December 5, 2022 10:46
@dokato
Copy link
Contributor Author

dokato commented Dec 5, 2022

Re: the mypy error I get, is an output type of _adj_pad correct?

Tuple[np.ndarray, np.ndarray, np.ndarray]:

I have impression that it returns a matrix, so np.ndarray.

@bdpedigo bdpedigo changed the title Fix graph matching with similarity matrix of unequal dimensions Fixed graph matching with similarity matrix of unequal dimensions Dec 8, 2022
Copy link
Collaborator

@bdpedigo bdpedigo left a comment

Choose a reason for hiding this comment

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

@dokato thanks for the PR, this looks good to me now. I added a test. I also wanted to make sure that naive padding is always used here. Mathematically, the similarity matrix does not need to be padded, but in the code (as you suggest) it is easier to just pad that matrix to make it bigger because of how the current code is written to assume it is square. However, I wanted to make sure that we aren't actually changing the objective function value by doing that padding (so, we make sure we only add 0s)

@bdpedigo bdpedigo merged commit 194678d into graspologic-org:dev Dec 8, 2022
@dokato dokato deleted the fix/gm-simil branch December 9, 2022 09:04
j1c pushed a commit that referenced this pull request Dec 10, 2022
* Fix seaborn syntax

* Increment bugfix version

* Exclude 3.6.1

I added to line 35. I assumed the asterisk on 3.3 meant all versions of 3.3 ex (3.3.1, 3.3.2) are all excluded from the matplotlib. 

Is this correct?

* Update setup.cfg

* Update README.md

Removed outdated Zenodo DOI from README.md

* Fixed graph matching with similarity matrix of unequal dimensions (#1002)

* Fix seaborn syntax

* fixed padding of a similarity amtrix for graph matching

* fixing mypy complaint from _adj_pad

* use naive padding for similarity

* add a test

* Revert "Fix seaborn syntax"

This reverts commit fd38e05.

* try to fix ipython error in doc generation

* just make sure the original S had the right shape

* run black

* fix tests

Co-authored-by: Benjamin Pedigo <benjamindpedigo@gmail.com>

* Edited contributing guidelines (#1000)

* Editing contributing guidelines 

My edits were based on my experience with getting set up on GitHub. I added some minor changes of things I wish I had read while I was trying to set up my account.

* fix typo

Co-authored-by: Benjamin Pedigo <benjamindpedigo@gmail.com>

* Update setup.cfg (#999)

* Added release notes for 2.0.1 (#1003)

Co-authored-by: Dax Pryce <daxpryce@microsoft.com>
Co-authored-by: hugwuoke <85888975+hugwuoke@users.noreply.github.com>
Co-authored-by: Kartikeya Tripathi <96724863+ktwillcode@users.noreply.github.com>
Co-authored-by: dokato <dkk33@cam.ac.uk>
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.

[BUG] Graph matching errors when similarity matrix has unequal dimensions
2 participants