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

Minor fixes for PARAFAC2 (#263 and more) #267

Merged
merged 12 commits into from
May 11, 2021
Merged

Minor fixes for PARAFAC2 (#263 and more) #267

merged 12 commits into from
May 11, 2021

Conversation

MarieRoald
Copy link
Contributor

This pull request fixes some small issues with the PARAFAC2 code

The added absolute tolerance and new maximum number of iterations were also based on the MATLAB code by Rasmus Bro (available here: http://www.models.life.ku.dk/algorithms).

@JeanKossaifi, before we can merge this, we should update the version number in the documentation (see the todos on line 185, 203, 378 and 396 of the _parafac2.py file). What would be the right version number?

Also, when I built the sphinx documentation, I noticed that there were no special formatting for the versionchanged HTML class. Maybe we should update the CSS?

@codecov
Copy link

codecov bot commented May 6, 2021

Codecov Report

Merging #267 (fee5fd2) into main (23ba632) will increase coverage by 0.02%.
The diff coverage is 52.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #267      +/-   ##
==========================================
+ Coverage   87.26%   87.28%   +0.02%     
==========================================
  Files          91       91              
  Lines        4553     4563      +10     
==========================================
+ Hits         3973     3983      +10     
  Misses        580      580              
Impacted Files Coverage Δ
tensorly/decomposition/_parafac2.py 80.13% <25.00%> (-2.14%) ⬇️
tensorly/decomposition/tests/test_parafac2.py 100.00% <100.00%> (ø)
tensorly/decomposition/_cp.py 78.35% <0.00%> (-0.38%) ⬇️
tensorly/contrib/decomposition/_tt_cross.py 92.45% <0.00%> (+3.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23ba632...fee5fd2. Read the comment docs.

@JeanKossaifi
Copy link
Member

Awesome, thanks @MarieRoald!

I've bumped the current version to '0.6.1'. This is a good point, we can add it to the scss and extend either the generic admonition or a specific one, e.g. note:

https://github.com/tensorly/tensorly-sphinx-theme/blob/d7d7a6a1c97535481296015b1778912e74760053/src/sass/tensorly_style.scss#L187

Setting it 1000*eps led to problems with single precision, so we set it to 1e-13 which is similar to 1000*eps for double precision
@MarieRoald
Copy link
Contributor Author

I added the version number, and I also changed the absolute tolerance to 1e-13, since 1000*eps was too large for the single-precision backends.

@JeanKossaifi
Copy link
Member

Thank you @MarieRoald, merging!

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.

None yet

2 participants