random_parafac2#

ivy.random_parafac2(shapes, rank, /, *, dtype=None, full=False, seed=None, normalise_factors=True)[source]#

Generate a random PARAFAC2 tensor.

Parameters:
  • shapes (Sequence[int]) – A shapes of the tensor to generate

  • rank (int) – rank of the Parafac2 decomposition

  • full (Optional[bool], default: False) –

    if True, a full tensor is returned otherwise,

    the decomposed tensor is returned

    seed

    seed for generating random numbers

Return type:

Union[Parafac2Tensor, Array]

Returns:

ivy.Parafac2Tensor