Objective function for CP tensor decomposition What is the objective function for CP (CANDECOMP/PARAFAC) tensor decomposition?
The decomposition tries to decompose a tensor $Z$ to $Z \approx \sum_{l=1}^L \lambda_l a_l \circ b_l \circ c_l $, where $\lambda_l \in \mathbb{R}_+$.   Does it mean that the objective function is squared error as in SVD? That is, is the corresponding optimization problem as below
$$\min_{\lambda,a,b,c: \|a_l\|=\|b_l\|=\|c_l\|=1, \lambda_l \ge 0} \sum_i \sum_j \sum_k (Z_{ijk} -\sum_{l=1}^L \lambda_l a_{li} \circ b_{lj} \circ c_{lk} )^2$$
Typically the objective is the squared $L_2$ distance for decomposition, but I just want to make sure.
 A: $a_l$,  $b_l$, and  $c_l$ should be replaced by $a_{li}$, $b_{lj}$, and  $c_{lk}$, respectively. The norm constraints  and $\lambda$ in min  and cost function can be dropped, i.e., $\min\limits_{a_k,b_k,c_k}$ is okay (unconstrained optimization). There are several matlab tooklboxes  that compute CP decomposition (e.g., tensorlab.net)
A: The article you link to is also titled Tensor Rank Decomposition:

[T]he tensor rank decomposition is sometimes historically referred to as PARAFAC or CANDECOMP.
When the number of terms $r$ is minimal in the above expression, then $r$ is called the rank of the tensor, and the decomposition is often referred to as a (tensor) rank decomposition, minimal CP decomposition, or Canonical Polyadic Decomposition (CPD).

The objective function for an (exact) decomposition as a sum of rank one tensors is not about an approximating sum, but rather about minimizing how many rank one tensors are needed to give an exact summation.  Thus the objective function here is a discrete function, counting the number of terms used.
Of course $n^2$ such tensors always suffice for an $n\times n$ matrix (or indeed $n$ will suffice), but in the "tensor rank" problem we want to know how few will suffice.
