GAMPTeam / vampyre

Approximate Message Passing in Python
MIT License
65 stars 28 forks source link

Composition of transforms #8

Open hbraunDSP opened 5 years ago

hbraunDSP commented 5 years ago

As a GAMPMatlab user I made extensive use of the LinTransCompose() function (I think that was the name). This was part of the modular "Lego-like" design that I really liked about it. I'd like to work on implementing LinTransCompose() for vampyre.

The problem is that as far as I know there is in general no way to calculate the SVD of the product of two matrices short of explicitly calculating their product and then calculating the SVD of that. This would be insane in terms of memory alone for many vampyre use cases. I propose to only provide an SVD for the special case of composition of unitary matrices and set svd_avail=False for others.

The problem with this is that estim.LinEst currently requires svd_avail=True. I'm willing to take that on as well but I may need some help with it; I was mainly an AMP user and only took a cursory look under the hood.

What do you think? Is this a good direction to work?

hbraunDSP commented 5 years ago

Alternatively, do we prefer that users add an intermediate node to the graph, sitting in between the two matrices?