1

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$

Rlz
  • 227

1 Answers1

2

$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.

andars
  • 278
  • 1
  • 9
  • What would the equation be in the format of y= – Rlz Apr 24 '17 at 15:06
  • The y = was implied. – Kaynex Apr 24 '17 at 15:08
  • Oh ok didn't realise. Thanks for the good answer. I will accept it as the answer as soon as it lets me. Any idea why they down voted? – Rlz Apr 24 '17 at 15:09
  • They probably thought you could think this one through. – andars Apr 24 '17 at 15:10
  • 1
    Oh. Well that's a shame, some people need help with certain problems and that is the point of this website. Down voting because they know it and you don't spoils the point – Rlz Apr 24 '17 at 15:11