I've been digging through the optimization literature for a solution to a problem like this, but have been coming up empty.
Suppose you have a modifiable matrix L (itself just a collection of vectors in a sample) and modifiable coefficients $\beta$. Given a set of objective vectors $O$, with each vector called $O_k$, is there a closed form for the solution to:
$$\arg \min_{L,\beta} \sum_k \| L\cdot\beta - O_k \|_2$$
particularly if $O_k$ is continuous and $L$ is restricted to binary?
I'm familiar with the derivation for ordinary linear least squares in matrix form, but haven't yet thought of a way to analytically solve this problem. Given it appears nonlinear I'm kind of expecting there won't be such an analytic solution, but I thought I would query the collective expertise of this site before giving up.
P.S. I've tagged it as both "convex optimization" and "nonlinear optimization" because while I'm pretty sure it's the latter given the multiplied variables in the form of $L$ and $\beta$, I'm not 100% certain whether it will be convex or not.
The problem is equivalent to
$$\arg \min_{x,L,\beta} \left\{ \sum_k\lVert x-O_k\rVert_2:x=L\beta \right\}$$
A relaxation to that problem is
$$\arg\min_{x} \left\{\sum_k\lVert x-O_k\rVert_2\right\}$$
and a necessary condition for a minimum $x^*$ is that
$$\nabla\sum_k\lVert x^*-O_k\rVert_2=\frac{\sum_{k}(x^*-O_k)}{\lVert x^*-O_k\rVert_2}=\boldsymbol 0$$
which gives the solution $x^*=\frac{1}{K}\sum_k{O_k}$.
Notice that $L=I$ and $\beta=x=\frac{1}{K}\sum_k{O_k}$ solves the original unrelaxed problem with the same objective value. So this is optimal.