Given the dataset $\{(X_1, y_1), (X_2, y_2), ..., (X_n, y_n)\}$, where $X_i$ are matrices of identical size, and $y_i$ are scalers, propose the following two-way linear regression scheme: $$ \hat{y_i} = u^{T} X_i v, $$ where $u$ and $v$ are vectors of appropriate sizes. Errors are defined in least square, so $$ \min_{u,v} \sum_{i} \left(y_i - \hat{y_i}\right)^2. $$
- What is the general, linear algebra solution for such regression, if there is one?
- Suggestions on solving this numerically by computer with the extra constraints that $||u|| = 1$ and all entry in $v$ is nonnegative, given that all $y_i$ is nonnegative?