-
Notifications
You must be signed in to change notification settings - Fork 299
Parafac2 ALS EM #563
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
Parafac2 ALS EM #563
Conversation
|
Hi @cchatzis Great! I have my hands full with a paper deadline right now, but I can take a look when my plate clears a little 🙂 |
|
Thanks @cchatzis for opening the PR, this will be great to have! For the failing tests, you can also try to run the tests locally using Regarding the masking, it would be more efficient to do the computation in a vectorized way, e.g. you can first multiply the who slice by the mask array of 0 and 1 and then take the mean over the resulting array rather than loop over individual elements. Thanks @MarieRoald, will be great to get your feedback too! |
cohenjer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cchatzis for this PR !
Looks correct to me, I have few minor comments.
|
Thanks again everyone for taking the time to look and review this. In the latest commits, I updated the code to include your feedback. Relevant tests are passing now - I will create a small test for the |
|
Thanks @cchatzis for the updates, this version looks good to me. |
MarieRoald
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Only a couple of minor comments on my end :)
yngvem
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just adding a couple of minor suggestions here :)
yngvem
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks very good! Just a couple of more changes and I think it's good to go :)
|
Hi everyone and thank you very much for your kind feedback and help! Maybe I am missing something but I cannot seem to reproduce the issue with the paddle backend because when i try to set it I set it for pytest (i.e. : I am sure I am missing something trivial here, any suggestion/help would be welcome :) |
|
Hi, are there any updates on this? |
yngvem
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost at the finish line now! I just have a small comment :)
Regarding the paddle trouble, I think that will sort itself out if you merge main into your feature branch (run git merge main from your feature branch)
|
@cchatzis thanks for the changes, feel free to mark the changes requested as done when it's ready! |
aarmey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together, @cchatzis! As this has been sitting, there are a few minor adjustments to make it consistent with code changes on main. Please also run the black formatter so that test passes. Everything else looks good to me, so I can merge it if you ping me after these edits.
Co-authored-by: Aaron Meyer <[email protected]>
Co-authored-by: Aaron Meyer <[email protected]>
Co-authored-by: Aaron Meyer <[email protected]>
Co-authored-by: Aaron Meyer <[email protected]>
Co-authored-by: Aaron Meyer <[email protected]>
Co-authored-by: Aaron Meyer <[email protected]>
|
Thank you for looking into this @aarmey! I added your suggestions and also made a small change for the paddle backend. Something in the lines of |
|
The test results with black don't seem to make sense, two-line comments are marked as problematic: [...] |
|
We can ignore those errors, since they don't involve the code here. Also, yes, use of |
Enable missing data imputation via the
maskargument as done in CP, as brought up in #543 .The changes are outlined as follows (all lines refer to
_parafac2.py):maskto theparafac2function._parafac2_reconstruction_errorto include themaskargument in casenorm_matricesis not given (lines 260, 297-306)_BroThesisLineSearchto includemask, required when computing the reconstruction error.maskdocstring whenever required.