tensorly.random.random_tucker

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

Generates a random Tucker tensor

Parameters:

shape : tuple

shape of the tensor to generate

rank : int or int list

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

full : bool, optional, default is False

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

orthogonal : bool, optional, default is False

if True, creates a tensor with orthogonal components

random_state : np.random.RandomState

Returns:

tucker_tensor : ND-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