How to make a sigmoid between $-1$ and $1$

528 Views Asked by At

I am trying to make a sigmoid which ranges from $-1$ to $1$.

I have found the formula $\dfrac{1}{​1+​e^{​\, ‑x}}-​0.5$ which creates a sigmoid between $-0.5$ and $0.5$

I need an equation that I can input $x$ and will get you the value for $y$

E.g. $y = x+5$

1

There are 1 best solutions below

5
On BEST ANSWER

$y(x) = \frac{2}{1+e^{-x}} -1 = 2 \sigma(x) - 1 = \tanh(x/2)$, where $\sigma$ is the standard sigmoid and $\tanh$ is the hyperbolic tangent. Twice the range, shifted down by one. Pick your favorite form.