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

Partial tucker decomposition via Higher Order Orthogonal Iteration (HOI)

Decomposes tensor into a Tucker decomposition exclusively along the provided modes.


tensor : ndarray

modes : int list

list of the modes on which to perform the decomposition

ranks : None or int list

size of the core tensor, (len(ranks) == len(modes))

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

core tensor of the Tucker decomposition

factors : ndarray list

list of factors of the Tucker decomposition. with core.shape[i] == (tensor.shape[i], ranks[i]) for i in modes