trouble converting vector notation into matrix notation

33 Views Asked by At

I have an expression of the form $\sum_{i}\sum_{j} ||y_{i} - p_{j}||_{2}^{2}$ where $i \in \{0,1\}$ and $j \in \{0,1,2\}$ and the vectors $y_{i}$ and $p_{j}$ lie in $\Re^{D}$.

I wish to convert the above summation into a matrix notation for optimization.

Clearly, $Y$ matrix ( containing $y_{i}$ values ) will lie in $\Re^{2 \times D}$ and matrix $P$ matrix ( containing $p_{j}$ values) will be in $\Re^{3 \times D}$. The closest solution (though not correct) I have reached so far is $||3Y - 1_{2 \times 3}P||_{F}^{2}$ where $1_{2 \times 3}$ is a matrix in $\Re^{2 \times 3}$.

Any guidance will be highly appreciated.

My original loss function is $\min_{Y_{t}} ||X_{t} - D_{t}Y_{t}||_{F}^{2} + \lambda_{1} ||D_{t} - D_{s}||_{F}^{2} + \lambda_{2} \sum_{i,j} w_{ij} ||\mathbf{y}_{i} - \mathbf{p}_{j}||_{2}^{2} + \lambda_{3}||Y_{t}||_{1}$ where $\mathbf{y_{i}} \in Y_{t}$ and optimization has to take place with respect to Y_{t}. Since all the terms are in matrix notation, it is worthwhile to convert the summation term (that is in vector notation) to matrix notation and then solve the optimization using gradient based optimization.