I need the function describing this curve.

282 Views Asked by At

I need a function that describes this curve:

enter image description here

going through zero and never reaching -1 or 1. Thank you for help :)

2

There are 2 best solutions below

1
On BEST ANSWER

This type of "S"-shaped curve is called a sigmoid function. A couple of common sigmoid functions are $\arctan$ and $\operatorname{tanh}$.

So just choose your favorite sigmoid function (or the one that matches your data the best) and then you can modify it by scaling the entire function -- $\alpha \arctan(x)$ -- to make it vertically wider or skinnier or scaling the input variable -- $\arctan(\beta x)$ -- to make it horizontally wider or skinnier.

P.S. That Wikipedia link has this really nice picture of some of the common sigmoid functions that I'll post here:

enter image description here

0
On

If you want to avoid fancy things like $\arctan$ or $e$, try the following: $$\frac{10^x-1}{10^x+1}$$ Really, this is just the $\tanh$ function that others have mentioned, but modified.