tensorly.kruskal_tensor.kruskal_to_vec

kruskal_to_vec(factors)[source]

Turns the khatri-product of matrices into a vector

(the tensor factors = [|U_1, ... U_n|] is converted into a raveled mode-0 unfolding)
Parameters:

factors : ndarray list

list of matrices, all with the same number of columns i.e.:

for u in U:
    u[i].shape == (s_i, R)

where R is fixed while s_i can vary with i

Returns:

ndarray

vectorised tensor