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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize only specific modes in cp_als() #302

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ghbrown
Copy link

@ghbrown ghbrown commented Jun 26, 2024

An argument called optdims of type List[int] is added to cp_als() to enable optimizing only the factor matrices of specific modes.
This was not previously possible even by scripting around cp_als() since it checks for convergence only after each full sweep.
Control flow was hardly altered (dimorder may now just be missing some entries), and the default is of course optimizing all modes.


馃摎 Documentation preview 馃摎: https://pyttb--302.org.readthedocs.build/en/302/

@dmdunla
Copy link
Collaborator

dmdunla commented Jun 26, 2024

@ghbrown Can you please add an issue as described in the GitHub workflow in CONTRIBUTING.md? And please include a motivating use case for this so that is captured in the Issue.

@tgkolda
Copy link

tgkolda commented Jun 27, 2024

Be careful about the convergence check which uses the last MTTKRP (at least in MATLAB) and assumes it's a particular mode that is left out.

@ghbrown
Copy link
Author

ghbrown commented Jun 28, 2024

Thanks for the warning, Tammy. I just looked over that part of the code, and because of where and how I updated dimorder I believe all of that should be properly taken care of automatically.
But I did catch and fix a comment that needed to change!

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

3 participants