tensorly.random
.random_tt_matrix
-
random_tt_matrix
(shape, rank, full=False, random_state=None, **context)[source] Generates a random tensor in TT-Matrix format
Parameters: - shapetuple
shape of the tensor to generate
- rankint
rank of the TT decomposition must verify rank[0] == rank[-1] ==1 (boundary conditions) and len(rank) == len(shape)+1
- fullbool, optional, default is False
if True, a full tensor is returned otherwise, the decomposed tensor is returned
- random_statenp.random.RandomState
- contextdict
context in which to create the tensor
Returns: - TT_tensorND-array or 3D-array list
- ND-array : full tensor if full is True
- 3D-array list : list of factors otherwise