How to transform the $\tanh$ sigmoid function so that it starts from $f(0)=0$, goes asymptotically to $1$, and has $f(0.1)=a$ and $f(0.9)=b$?
Is it possible with that function at all?
How to transform the $\tanh$ sigmoid function so that it starts from $f(0)=0$, goes asymptotically to $1$, and has $f(0.1)=a$ and $f(0.9)=b$?
Is it possible with that function at all?
Starting from $$f(x)=p+q\tanh (rx+s)$$with $$\tanh(u)={e^{2u}-1\over e^{2u}+1}$$we obtain $$q,r>0$$ $${p+q=1\\p+q\tanh(s)=0\\ p+q\tanh(0.1r+s)=a\\ p+q\tanh(0.9r+s)=b\\ }$$which leaves us with a bunch of non-analytically solvable equations that should be coped numerically.
I understand that you want $$\lim_{t\to-\infty}f(t)=0,\quad f(0.1)=a,\quad f(0.9)=b,\quad \lim_{t\to\infty}f(t)=1\ .$$ The limit conditions can be fulfilled with $$f(t)={1+\tanh\bigl(c(t-t_0)\bigr)\over2},\quad c>0,\quad t_0\in{\mathbb R}\ .$$ The parameters $c$ and $t_0$ adjust the time scale and have to be chosen such that your numerical data are met. This should be possible for arbitrary values $0<a<b<1$.
We obtain the equations $$\eqalign{\tanh\bigl(c(0.1-t_0)\bigr)&=2a-1 \cr \tanh\bigl(c(0.9-t_0)\bigr)&=2b-1\ , \cr}$$ or $$\eqalign{c(0.1-t_0)&={\rm artanh}(2a-1) \cr c(0.9-t_0)&={\rm artanh}(2b-1)\ . \cr}$$ The RHSs of the last equations are known real numbers. It is then easy to find $c$ and $t_0$. Note that the inverse of $\tanh$ can be calculated by $${\rm artanh}(t)={1\over2}\log{1+t\over1-t}\qquad(-1<t<1)\ .$$