oseledets / TT-Toolbox

The git repository for the TT-Toolbox
Other
189 stars 73 forks source link

Where is the TT-Cross Algorithm #44

Closed bolongz closed 4 years ago

bolongz commented 4 years ago

Could you please tell me where is the TT-Cross algorithm shown in this paper: TT-cross approximation for multidimensional arrays?

Thanks.

dolgov commented 4 years ago

Hello,

a more advanced rank-adaptive version is implemented in cross/amen_cross.m You can turn it into the fixed-rank TT-Cross by passing the optional parameter 'zrank', 0. In this case you might also want to pass an initial guess of appropriate ranks using the parameter 'y0'.

Best, Sergey.

bolongz commented 4 years ago

Hello,

a more advanced rank-adaptive version is implemented in cross/amen_cross.m You can turn it into the fixed-rank TT-Cross by passing the optional parameter 'zrank', 0. In this case you might also want to pass an initial guess of appropriate ranks using the parameter 'y0'.

Best, Sergey.

Hi Sergey,

Thanks for your reply. But I still have a little bit confuse about the implementation. Why do the TT-cross algorithm accept a fun parameter to evaluate the value for the elements from the tensor? If I just want to to the cross approximation, should I just pass the identical function (for example f(x) = x)?

Thanks. Bolong

dolgov commented 4 years ago

Any cross algorithm approximates a tensor when each element is defined by a function of its index. In this case you need to pass this function (something like @(ind)fun(ind)), and a vector of mode sizes (this will define ranges for indices).

A function of other tt_tensors is convenient when we have a small number of those, for example we need to compute y = exp(x) elementwise, where x is a given tt_tensor. In this case the indexwise function would be overly cumbersome, but we can just pass {x} and @(x)exp(x).

bolongz commented 4 years ago

Any cross algorithm approximates a tensor when each element is defined by a function of its index. In this case you need to pass this function (something like @(ind)fun(ind)), and a vector of mode sizes (this will define ranges for indices).

A function of other tt_tensors is convenient when we have a small number of those, for example we need to compute y = exp(x) elementwise, where x is a given tt_tensor. In this case the indexwise function would be overly cumbersome, but we can just pass {x} and @(x)exp(x).

Got it. Thanks a lot for your explanation.