# How to solve the tensor approximation optimization problem?

Given a third-order tensor $$\mathcal{X}\in\mathbb{R}^{I_1\times I_2\times I_3}$$, we want to find an approximation tensor $$\hat{\mathcal{X}}$$ of $$\mathcal{X}$$ with $$R$$ rank-one components, and some entries of $$\hat{\mathcal{X}}$$ are given. Thus the optimization problem can be formulated as: $$\begin{equation*} \begin{array}{cl} \arg\min\limits_{\hat{\mathcal{X}}}\quad& \|\mathcal{X}-\hat{\mathcal{X}}\|\\ \mathrm{s.t.}\quad&\hat{\mathcal{X}} = \sum\limits_{r=1}^{R}\mathbf{a}_{r}^{(1)}\circ\mathbf{a}_{r}^{(2)}\circ\mathbf{a}_{r}^{(3)},\\ \quad&\hat{\mathcal{X}}_{ijk}=\mathcal{X}_{ijk},\quad (i,j,k)\in E. \end{array} \end{equation*}$$ Where $$E$$ is an index subset, and $$\mathbf{a}_{r}^{(l)}\in\mathbb{R}^{I_l}$$ ($$l$$=1,2,3). How to solve this optimization problem? Is there any software for using?

As we know, a similar optimization problem called CP decomposition of a tensor, $$\begin{equation*} \begin{array}{cl} \arg\min\limits_{\hat{\mathcal{X}}}\quad& \|\mathcal{X}-\hat{\mathcal{X}}\|\\ \mathrm{s.t.}\quad&\hat{\mathcal{X}} = \sum\limits_{r=1}^{R}\mathbf{a}_{r}^{(1)}\circ\mathbf{a}_{r}^{(2)}\circ\mathbf{a}_{r}^{(3)} \end{array} \end{equation*}$$ can be solve using the alternating least squares (ALS) method, and serval software can perform this efficiently.