1

Suppose that I have several $x_i$ variables ($0 \le i \lt N$). And I have equations of the form: $$w_0x_{n_0}x_{n_1} + w_1x_{n_2}x_{n_3} + w_2x_{n_4}x_{n_5} + w_3x_{n_6}x_{n_7} = K_0$$ $$w_4x_{n_8}x_{n_9} + w_5x_{n_{10}}x_{n_{11}} + w_6x_{n_{12}}x_{n_{13}} + w_7x_{n_{14}}x_{n_{15}} = K_1$$ $$w_8x_{n_{16}}x_{n_{17}} + w_9x_{n_{18}}x_{n_{19}} + w_{10}x_{n_{20}}x_{n_{21}} + w_{11}x_{n_{22}}x_{n_{23}} = K_2$$ $$\vdots$$

So, these $x_i$ variables multiplied together in pairs (variable indices are $n_*$), pairs are weighted, then summed. These equations form an overconstrained system (there are way more equations than $N$).

Is there a method which can find optimal $x_i$ values for particular $n_*$, $w_*$ and $K_*$ values? Supposedly in a least squares manner.

By optimal, I mean: let's say, that the actual value of each sum is $A_*$:

$$w_0x_{n_0}x_{n_1} + w_1x_{n_2}x_{n_3} + w_2x_{n_4}x_{n_5} + w_3x_{n_6}x_{n_7} = A_0$$ $$w_4x_{n_8}x_{n_9} + w_5x_{n_{10}}x_{n_{11}} + w_6x_{n_{12}}x_{n_{13}} + w_7x_{n_{14}}x_{n_{15}} = A_1$$ $$w_8x_{n_{16}}x_{n_{17}} + w_9x_{n_{18}}x_{n_{19}} + w_{10}x_{n_{20}}x_{n_{21}} + w_{11}x_{n_{22}}x_{n_{23}} = A_2$$ $$\vdots$$

I'd like to have $x_i$, for which the sum $$\sum_j{(K_j-A_j)^2}$$ is the least.

geza
  • 293
  • 1
    Can you please define the term "optimal"? That is, what are you optimizing? – Adrian Keister Aug 06 '19 at 15:33
  • 1
    @AdrianKeister: I've expanded my question. – geza Aug 06 '19 at 16:58
  • If you simply re-define your $x_{n_i}x_{n_{i+1}}$ pairs as, say, $y_{n_i}=x_{n_i}x_{n_{i+1}},$ you have exactly a regular linear least-squares problem to solve. Is there particular significance to the $x$'s that would make you want to keep those variables, instead of switching to the $y$'s I've outlined? – Adrian Keister Aug 06 '19 at 20:13
  • @AdrianKeister: yes, I'd like to keep using $x$, it contains the information I need. Currently I use a method, which is an iterative process. It first solves for $x_{2i}$ with least-squares, then it solves for $x_{2i+1}$. And it keeps repeating these least-squares processes for several iterations. But I'm not sure whether this converges to a global solution or not. – geza Aug 06 '19 at 21:03
  • Well, the problem as I see it is that while you could certainly solve for the products, and there's even a closed-form equation for that, it would not uniquely determine the $x$'s. Multiple $x$ pair products could give you the same $y$ values (using the notation in my previous comment). This leads me to believe there is no unique solution. – Adrian Keister Aug 06 '19 at 21:12
  • @AdrianKeister: The closed form solution works for only $y_{n_i}$. But maybe this is not the optimal solution if we consider $x$. I mean, if we find an (any) optimal solution for $x$, the product of pair of $x$ may not end up the same as $y$. – geza Aug 06 '19 at 21:17
  • I disagree. The optimal solution for $y$ is given by the formula, or can be found by stochastic gradient descent. That's THE optimal solution and there will be no other for the $y$'s. Therefore, if you find any optimal solution for one of the $x$'s in a pair, its pair product will have to multiply to get to that optimal $y$. – Adrian Keister Aug 06 '19 at 21:19

0 Answers0