Problem
I have a list of orders, approximation of their total weight and list of items they contain. I need to determine approximate weight of individual items.
In other words, I have a few thousand of equations like these: $$ \begin{cases} 3x_{110} ~+ & x_{242} ~+ &5x_{412} = 82.5 \\ 8x_{784} ~+ &4x_{124} ~+ &2x_{872} = 49.2 \\ 1x_{784} ~+ & x_{124} ~+ &x_{847} = 120.2 \\ \end{cases} $$ And I need to find approximate values of $x$, such that the sum of squared errors would be minimal. It seems to me like my problem is a Matrix formulation of Ordinary least squares. Is this correct?
May I ask for advice on how to practically calculate this for thousands of equations with thousands of variables?
What I've tried
- I've tried using solver in Excel, but that didn't work because it's limited to 200 variables.
- I've tried generating the equations in GNU MathProg and using an online solver, but the results don't seem to be accurate enough, as this solver supports only strictly linear equations (i.e. no absolute value, no squared errors).