Applying noise with constraints

41 Views Asked by At

I need to add noise distribution. Noise from a normal distribution would be best.

  • An input vector ${x} \in [0,1]$ is given which the vector sums to one.
  • A noise is generated and applied to $x$
  • The resulting noised $x$ should still sum to 1 and in range $x\in[0,1]$. And the weights of the elements are not too far off from the original input.

How can I achieve this?

I tried generating noise from noise and normalizing it with dividing with the sum. But some noise is negative, so summation could end up with 0 denominator.

1

There are 1 best solutions below

0
On BEST ANSWER

There are plenty of ways to tackle the problem, but adding normal noise with no restrictions is going to make things a bit harder for you given your constraints.

Perhaps a more stable option, which avoids the issues of negative values entirely, is to consider multiplicative rather than additive noise. If we draw $\delta_i$ from some distribution of strictly positive values, then we can take $y_i = x_i \delta_i$, and then setting $x_i' = \frac{y_i}{\sum y_j}$ gives us:

  1. $x_i' \geq 0$

  2. $\sum x_i' = 1$

Which are two of the desired properties. The third property, wanting $x_i'$ to be somehow "close" to $x_i$, will come by choosing a distribution for $\delta_i$ that is centred around 1 and isn't too variable. One option is to make $\delta_i \sim U(1-d,1+d)$ with $d \in (0, 1)$.