tensorly.random
.random_parafac2
- random_parafac2(shapes, rank, full=False, random_state=None, normalise_factors=False, **context)[source]
Generate a random PARAFAC2 tensor
- Parameters:
- shapetuple
A tuple where each element represents the shape of a matrix represented by the PARAFAC2 model. The second element in each shape-tuple must be constant.
- rankint or int list
rank of the Parafac2 decomposition
- fullbool, optional, default is False
if True, a full tensor is returned otherwise, the decomposed tensor is returned
- random_statenp.random.RandomState