# CP decomposition for tensor factorization

I am trying to understand CP decomposition for a three way tensor. Lets have a tensor which has the dimensions I by J by K. When we apply CP decomposition, it decomposes the tensor as a sum of a rank-1 tensors.

$\sum_{r=1}^R a_r \otimes b_r \otimes c_r$

The question is each dimension is different, how do they sum up to R? Also, how to find R. Is it randomly chosen?

Thanks in advance.

## 1 Answer

Here's an old but classic overview on this problem and related ones.

http://www.sandia.gov/~tgkolda/pubs/pubfiles/TensorReview.pdf

To answer your exact question: $a_r$, $b_r$, and $c_r$ have lengths $I, J, K$ respectively. Thus, each rank-one tensor has the same dimensions as your data. The number $R$ is how many rank-one tensors get added together to form your approximation.

Finding the rank $R$ of the tensor is NP-hard. Finding the best rank-$R$ approximation is also often ill-posed: there may be an infinite sequence of rank $R$ tensors, each one giving a better approximation than the last. (Look for "border rank" in the reference.)