How can I construct a specific sigmoid function?

763 Views Asked by At

The simple sigmoid function $$f(x)=1/(1+e^{−x})$$ approaches zero as x tends to negative infinity, and approaches $1$ as x tends to positive infinity. But I want to set $1$ and $20$ instead of $0$ and $1$. Simply my sigmoid function should behave like this: $$\lim_{x \to +\infty} f(x) = 20,$$ and $$ \lim_{x \to -\infty} f(x) = 1.$$

2

There are 2 best solutions below

0
On BEST ANSWER

try $$f(x)=\frac{1+20e^{x}}{1+e^{x}}$$

0
On

For a more general case where,

$$\lim_{x \to +\infty} f(x) = u,$$ and $$ \lim_{x \to -\infty} f(x) = v.$$

Try,

$$ \sigma(x) = \frac{v+ue^x}{1+e^x} $$