sandialabs / pyttb

Python Tensor Toolbox
https://pyttb.readthedocs.io
BSD 2-Clause "Simplified" License
26 stars 13 forks source link

Add CP_OPT #351

Open ntjohnson1 opened 5 hours ago

ntjohnson1 commented 5 hours ago

Goal: Align implementation with GCP_OPT while retaining the cp_opt top level interface as faithfully as possible.

Components:

Won't do unless needed/requested as follow up:

dmdunla commented 5 hours ago

I think that scipy’s L-BFGS-B (via minimize) without constraints reduces to L-BFGS. Will that work to support the tt_opt_lbfgs.m use case you called out for cp_opt?


From: Nick @.> Sent: Saturday, November 23, 2024 10:15 AM To: sandialabs/pyttb @.> Cc: Subscribed @.***> Subject: [EXTERNAL] [sandialabs/pyttb] Add CP_OPT (Issue #351)

Goal: Align implementation with GCP_OPT while retaining the cp_opt top level interface as faithfully as possible.

Components: [ ] cp_opt.m [ ] ktensor/fg.m [ ] tt_opt_lbfgsb.m [ ] tt_opt_fmincon.m [ ] tt_opt_fminunc.m [ ] tt_opt_compact.m [ ] tt_opt_adam.m

Won't do unless needed/requested as follow up:

— Reply to this email directly, view it on GitHubhttps://github.com/sandialabs/pyttb/issues/351, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHIY2IVG4U3YLTJ27INH45L2CCZ4LAVCNFSM6AAAAABSLIQZ4KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY4DMMRYGM4TMNA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ntjohnson1 commented 4 hours ago

I can take a look at the end (or potentially do it as a follow up).

ntjohnson1 commented 4 hours ago

I timed out for this afternoon but here is my development branch for this: https://github.com/ntjohnson1/pyttb/tree/nick/cp_opt

I have most of cp_opt, function/gradient handles for the specific cp opt problem, and lbfgsb implemented. Still need to improve doc strings, and tests to confirm things are functionally correct (right now I have a simple test to confirm when the answer is provided for init things word). I basically followed the same internal structure for the solvers in gcp_opt, however the cp_opt components operate on actual tensors rather than just blocks of data so I had to slightly tweak some interfaces. No rush, but feel free to share if you have any thoughts on the layout/alignment with gcp_opt.

I also updated the description for some of the other optimizers python had used. My preference would be to implement a subset of the optimizers if the primary motivation is the textbook rather than real world usage.