Skip to content

Approximate joint diagonalization#571

Open
aarmey wants to merge 30 commits intotensorly:mainfrom
meyer-lab:jt-diag
Open

Approximate joint diagonalization#571
aarmey wants to merge 30 commits intotensorly:mainfrom
meyer-lab:jt-diag

Conversation

@aarmey
Copy link
Copy Markdown
Contributor

@aarmey aarmey commented Aug 1, 2024

This adds a function for deriving an approximate joint diagonalization for a set of matrices. This function is the basis of solvers that derive PARAFAC factorization by diagonalizing the Tucker decomposition. By using only a few iterations, this can also be used to improve the starting estimate for initializing PARAFAC.

@aarmey aarmey self-assigned this Aug 1, 2024
@aarmey aarmey changed the title [WIP] Approximate joint diagonalization Approximate joint diagonalization Aug 1, 2024
@JeanKossaifi
Copy link
Copy Markdown
Member

Really excited to have this in TensorLy @aarmey, it's a neat method!
We could almost have a separate PR for the backend cleanup (though fine to have it here too!).

Copy link
Copy Markdown
Member

@JeanKossaifi JeanKossaifi left a comment

Choose a reason for hiding this comment

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

Looks great! Just left some notes in the code.

Comment thread tensorly/utils/jointdiag.py Outdated
Comment thread tensorly/utils/jointdiag.py Outdated
Comment thread tensorly/utils/jointdiag.py Outdated
Comment thread tensorly/utils/jointdiag.py Outdated
Comment thread tensorly/utils/jointdiag.py Outdated
Comment thread tensorly/utils/jointdiag.py Outdated
Comment thread tensorly/utils/jointdiag.py Outdated
Comment thread tensorly/utils/jointdiag.py Outdated
Comment thread tensorly/utils/jointdiag.py Outdated
Comment thread tensorly/utils/tests/test_jointdiag.py
@JeanKossaifi
Copy link
Copy Markdown
Member

Thanks again @aarmey - I can't seem to be able to relaunch the tests nor check the logs for these runs as they were too long ago

@aarmey
Copy link
Copy Markdown
Contributor Author

aarmey commented Nov 18, 2025

Thanks for pointing this out, @JeanKossaifi. I lost track of this. There are a few more changes for me to make, then I'll hopefully tag you for a review by the end of the year.

@JeanKossaifi
Copy link
Copy Markdown
Member

Sounds great, thank you!

Aaron Meyer added 2 commits November 19, 2025 11:58
- Rename X to matrices_tensor and update internals
- Correct tl.copy to use the input tensor
- Improve docstring and add References section
- Update tests to import from jointdiag module
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 95.78947% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.41%. Comparing base (983e497) to head (27ba663).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
tensorly/utils/jointdiag.py 95.45% 3 Missing ⚠️
tensorly/backend/core.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #571      +/-   ##
==========================================
+ Coverage   88.07%   88.41%   +0.33%     
==========================================
  Files         132      134       +2     
  Lines        7943     8034      +91     
==========================================
+ Hits         6996     7103     +107     
+ Misses        947      931      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aarmey aarmey requested a review from JeanKossaifi November 21, 2025 03:23
@aarmey
Copy link
Copy Markdown
Contributor Author

aarmey commented Nov 21, 2025

@JeanKossaifi I think this is now thoroughly cleaned up and working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants