Converting normalised values into original

26 Views Asked by At

I have a normalisation formula as follows, which takes a list of numbers, such as $1,2,3,4,5,6,7,8,9,10$, and returns the normalized values which guarantees that $\tilde{x_i} \in [0,1]$.

$$\tilde{x_{i}} = \frac{1}{1+exp(-\frac{x_i-\bar{x}}{\sigma})},$$

where $\bar{x}$ is the mean, and $\sigma$ is the standard deviation.

This returns the following for the sequence of numbers shown above:

$$0.184477563844704, 0.239392689073408, 0.304550215384229, 0.378614366118735, 0.458807435745289 0.541192564254711, 0.621385633881265, 0.695449784615771, 0.760607310926592, 0.815522436155296$$

I then rearranged the above formula to make $x_i$ the subject, in order to get the original values from the normalised list as follows:

$$x_i = \bar{x} * \sigma * ln(\frac{1}{\tilde{x_i}}-1)$$

Although this seems incorrect as it does not return the original list. Anyone have any idea what I have done wrong?

Thanks in advance

1

There are 1 best solutions below

0
On BEST ANSWER

Your inversion formula is wrong.

From $$ u = \frac{1}{1+\exp(-\frac{x_i-\bar{x}}{\sigma})}, $$ you can solve \begin{align} u_i &= \frac{1}{1+\exp(-\frac{x_i-\bar{x}}{\sigma})}\\ u_i(1+\exp(-\frac{x_i-\bar{x}}{\sigma})) &=1\\ u_i+ u_i \exp(-\frac{x_i-\bar{x}}{\sigma}) &=1\\ u_i \exp(-\frac{x_i-\bar{x}}{\sigma}) &=1 - u_i\\ \exp(-\frac{x_i-\bar{x}}{\sigma}) &=\frac{1 - u_i}{u_i}\\ -\frac{x_i-\bar{x}}{\sigma} &=\ln \left(\frac{1 - u_i}{u_i} \right)\\ x_i-\bar{x} &= -\sigma\ln \left(\frac{1 - u_i}{u_i} \right)\\ x_i &= \bar{x}-\sigma\ln \left(\frac{1 - u_i}{u_i} \right)\\ \end{align}