tensorly.decomposition
.parafac_power_iteration
- parafac_power_iteration(tensor, rank, n_repeat=10, n_iteration=10, verbose=0)[source]
CP Decomposition via Robust Tensor Power Iteration
- Parameters:
- tensortl.tensor
input tensor to decompose
- rankint
rank of the decomposition (number of rank-1 components)
- n_repeatint, default is 10
number of initializations to be tried
- n_iterationint, default is 10
number of power iterations
- verbosebool
level of verbosity
- Returns:
- (weights, factors)
- weights1-D tl.tensor of length rank
contains the eigenvalue of each eigenvector
- factorslist of 2-D tl.tensor of shape (size, rank)
Each column of each factor corresponds to one eigenvector