5
votes

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.

3

3 Answers

5
votes

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.

0
votes

You can use the Tensor Toolbox for working with tensors. you can use the sptensor() to create the sparse tensor in this Toolbox.

0
votes

If you're looking for a truly scalable solution, take a look at SPLATT: http://glaros.dtc.umn.edu/gkhome/splatt/overview