# Minimize the Cost Function of Values of Vectors Based on Their Amplitude

I have two vectors $$X = [x_1,x_2,x_3,x_4]$$; and $$Y = [y_1,y_2,y_3,y_4]$$; I know that $$|x_1|$$ = $$|y_1|$$, and $$|x_2|$$ = $$|y_2|$$,... so on. it means the difference is only in the sign. it might be either similar to same sign.

Those two vectors have been affected by such noise, and I need to create a cost function to recover them. Is it possible to perform that using such algorithm of optimization ?

• so, your $x_i, y_i \in \mathbb R$? Cost function for use in what? The obvious cost function here would be the absolute difference, but a specific noise model might suggest something else. What's your noise? Additive? Multiplicative? Only positive? Symmetrical to 0? Real? Complex? correlated? white? – Marcus Müller Sep 16 at 5:50
• $x_i$ and $y_i$ are complex numbers. the cost function is to recover the two vectors because of the additive noise effects. – Gze Sep 16 at 12:55
• Is that Additive White Noise? Since they are complex, do you mean they have different phase or necessarily the phase of one is either identical or +180? – Royi Sep 16 at 13:03
• The phase of one is either identical or +180 @Royi – Gze Sep 16 at 13:20
• If that the case any algorithm probably (If it uses ${L}_{2}$) can assume real numbers which are identical by their absolute value. – Royi Sep 16 at 16:31

Since there is no prior at the Vector level this is basically element wise problem.
Moreover, if we assume the noise to be White Noise with zero mean then the answer can be very simple.

Since the phase difference is always a multiply of 180 [Deg] we can, without loss of generality, assume they are on the real axis.

So what we have can be modeled as:

$${z}_{1} = {w}_{1} + {n}_{1}, \; {z}_{2} = {w}_{2} + {n}_{2}, \; \left| {w}_{1} \right| = \left| {w}_{2} \right|$$

So the answer will be $$\hat{w}_{1} = \operatorname{sign} \left( {z}_{1} \right) \frac{\left| {z}_{1} \right| + \left| {z}_{2} \right|}{2}$$ and $$\hat{w}_{2} = \operatorname{sign} \left( {z}_{2} \right) \frac{\left| {z}_{1} \right| + \left| {z}_{2} \right|}{2}$$.

This comes from a simple intuition. Let's assume bot are positive and $${w}_{1} = {w}_{2}$$. Then of course the answer will be, for any white noise, to average the results. So we are doing the same, averaging them, just taking care of the case they have opposite phases (In the complex plane they are on the same circle just could be on opposite directions).

If you assume AWGN and build the Maximum Likelihood Estimator you'll get the same result.