tucker(tensor, rank=None, ranks=None, n_iter_max=100, init='svd', svd='numpy_svd', tol=0.0001, random_state=None, verbose=False)[source]

Tucker decomposition via Higher Order Orthogonal Iteration (HOI)

Decomposes tensor into a Tucker decomposition: tensor = [| core; factors[0], ...factors[-1] |] [R18]

tensor : ndarray

ranks : None or int list

size of the core tensor, (len(ranks) == tensor.ndim)

n_iter_max : int

maximum number of iteration

init : {‘svd’, ‘random’}, optional

svd : str, default is ‘numpy_svd’

function to use to compute the SVD, acceptable values in tensorly.SVD_FUNS

tol : float, optional

tolerance: the algorithm stops when the variation in the reconstruction error is less than the tolerance

random_state : {None, int, np.random.RandomState}

verbose : int, optional

level of verbosity


core : ndarray of size ranks

core tensor of the Tucker decomposition

factors : ndarray list

list of factors of the Tucker decomposition. Its i-th element is of shape (tensor.shape[i], ranks[i])


[R18](1, 2) tl.G.Kolda and B.W.Bader, “Tensor Decompositions and Applications”, SIAM REVIEW, vol. 51, n. 3, pp. 455-500, 2009.