Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matlab sparse tensor

Does Matlab support efficient operations on large sparse tensors?

More specifically:

  1. Is there an elegant way, similar to sparse, of loading and storing a sparse tensor? As far as I can understand, sparse can only load matrices.
  2. Are operations like tensor product implemented efficiently over sparse tensors?

I realize I can always store a tensor as a combination of cell arrays of matrices, but that would require using loops, and I'm hoping to avoid that.

Since the data I'm working with is very large, I cannot consider a non-sparse representation.

like image 877
Dana Avatar asked Nov 22 '11 15:11

Dana


1 Answers

Out of the box, I believe MATLAB only handles sparse matrices, as you say.

But you might like to take a look at the Tensor Toolbox and the N-way Toolbox to see if they meet your needs. Both are freely available, and I've heard good things about both (although I've used neither myself). The Tensor Toolbox in particular seems to have at least some support for sparse multidimensional arrays.

like image 123
Sam Roberts Avatar answered Sep 21 '22 05:09

Sam Roberts