tensorly.random.random_tucker

random_tucker(shape, rank, full=False, orthogonal=False, random_state=None, non_negative=False, **context)[source]

Generates a random Tucker tensor

Parameters:
shapetuple

shape of the tensor to generate

rankint or int list

rank of the Tucker decomposition if int, the same rank is used for each mode otherwise, dimension of each mode

fullbool, optional, default is False

if True, a full tensor is returned otherwise, the decomposed tensor is returned

orthogonalbool, optional, default is False

if True, creates a tensor with orthogonal components

random_statenp.random.RandomState
Returns:
tucker_tensorND-array or (ND-array, 2D-array list)

ND-array : full tensor if full is True (ND-array, 2D-array list) : core tensor and list of factors otherwise