I have a set of $n$ events. Each event has $m$ variables. At least 1 event produces an observation. It is possible for several events to occur simultaneously.
E.g.
4 Events. 3 variables each:
$E_{11}=0.4, E_{12}=-0.3, E_{13}=-0.4, E_{21}=0.3, ... , E_{42}=-3.0, E_{43}=2.1$
produces $y_1 = -5$
Here all events occurred simultaneously.
However, it is also possible for this to occur:
$E_{11}=0.2, E_{12}=0.2, E_{13}=-2$ and all other events are 0 (they did not occur).
So I want to scale up all the coefficients to match the observation.
Effectively I want to be able to weigh the events with 4 weights; $W_1$ to $W_4$ so that the total contribution for the first vector (all events) would be:
$W_1\cdot$(regression coeffs of $E_1) + W_2\cdot$(regression coeffs of $E_2) + ... + W_4\cdot$(regression coeffs of $E_4)$. Where each $W$ here has been normalized (and all $W$ are $>0)$.
In solving this regression, you have the usual matrix of observations $A$, a sparse weight matrix $w$, the vector of unknown coefficients $x$ and the resulting observations $y$.
I.e.
\begin{align} \displaystyle \left( \begin{array}{lllll} E^1_{11} & E^1_{12} & ... & E^1_{42} & E^1_{43}\\ E^2_{11} & E^2_{12} & ... & E^2_{42} & E^2_{43}\\ ... \\ E^{k-1}_{11} & E^{k-1}_{12} & ... & E^{k-1}_{42} & E^{k-1}_{43}\\ E^{k}_{11} & E^{k}_{12} & ... & E^{k}_{42} & E^{k}_{43} \end{array}\right)\\\cdot \left(\begin{array}{lllll} \frac {W_1}{\sum_4 W_i} & \frac {W_1}{\sum_4 W_i} & ... & \frac {W_4}{\sum_4 W_i} & \frac {W_4}{\sum_4 W_i}\\ \frac {W_1}{W_1+W_2} & \frac {W_1}{W_1+W_2} & ... & 0 & 0\\ ... \\ 0 & 0 & ... & 0 & 0\\ 0 & 0 & ... & 1 & 1\end{array}\right)^T \left(\begin{array}{l} a_{11}\\a_{12}\\a_{13}\\...\\a_{41}\\a_{42}\\a_{43}\end{array}\right)\\= \left(\begin{array}{l} y_1\\ y_2\\ ...\\ y_{k-1}\\ y_{k} \end{array} \right) \end{align}
In the above equation, the first observation had all 4 events happen, the second one only events 1 and 2 occurred etc. The last observation only had event 4 occur. The $E$s and $y$s are known.
I need the vector of coefficients (the $a$s) and the weights $(w_1$ – $w_4)$. How do I solve this efficiently? Thanks.