# Some Useful Bijections

In constrained optimization problems with very simple (constant) constraints it is sometimes useful to simply use a global optimization algorithm with an appropriate one-to-one transformation of the parameters. Suppose we want to optimize an objective function $f(\theta )$ where $\theta \in A$. If there exists a continuous mapping $\varphi :\mathbb{R}\to A$ such that for all $x,y\in A$, $\varphi (x)=\varphi (y)$ if and only if $x=y$, then it is equivalent to optimize $f(\varphi (x))$ over $\mathbb{R}$. If $\overline{x}$ is the resulting optimum, then we can apply the inverse transformation to obtain $\overline{\theta}={\varphi}^{-1}(\overline{x})$.

Below is a table of useful transformations of this type. Most of them are not very difficult to derive, but it seems useful to have a list of them in one place. $A$ denotes the constraint set. They can be scaled as needed for other intervals.

$A$ | $\mathbb{R}\to A$ | $A\to \mathbb{R}$ |
---|---|---|

$[0,\mathrm{\infty})$ | ${e}^{x}$ | $\mathrm{ln}(x)$ |

$(-\mathrm{\infty},0]$ | $-{e}^{x}$ | $\mathrm{ln}(-x)$ |

$[0,1]$ | $\frac{1}{1+{e}^{-x}}$ | $-\mathrm{ln}(\frac{1}{\theta}-1)$ |

$[-1,1]$ | $\frac{2}{1+{e}^{-x}}-1$ | $-\mathrm{ln}(\frac{2}{\theta +1}-1)$ |

Note that the mapping $\mathbb{R}$ to $[0,1]$ is the Sigmoid Function.

Finally, a multidimensional transformation is useful when the parameters represent probabilities. Suppose $\theta \in A$ where $$A=\{({\theta}_{1},{\theta}_{2},\dots ,{\theta}_{n})|0\le {\theta}_{i}\le 1\phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}\sum _{i}{\theta}_{i}=1\}.$$ Here, $A$ is the standard $n-1$ simplex. The corresponding mapping is $\varphi :{\mathbb{R}}^{n-1}\to A$ where $${\varphi}_{i}(x)=\frac{{e}^{{x}_{i}}}{1+\sum _{j=1}^{n-1}{e}^{{x}_{j}}}$$ for $1\le i\le n-1$ and $${\varphi}_{n}(x)=\frac{1}{1+\sum _{j=1}^{n-1}{e}^{{x}_{j}}}.$$ This is the same mapping that arises in the multinomial logit and conditional logit regression models.