I want to design a function with the following properties:
- $f(x) : [0.15, 0.25] \to [0.25, 0.75]$, $f(0.15)=0.25$; $f(0.25)=0.75$
- $f(x)$ has a sigmoid-like shape, symmetric/centered at $x=0.2$ (is continuous, increasing, etc.)
- I want to be able to control the steepness of the exponentials
What is the best way to do this? Can I start with the sigmoid function $f(x) = \frac{1}{1+e^{-x}}$ and modify it to get what I need, or do I need to build something from scratch? Thanks
Suppose that we make an affine transformation of each of the variables $x'=ax+b$, $y'=cy+d$. Then the standard sigmoid $y=(1+e^{-x})^{-1}$ is sent to
$$y'=\frac{c}{1+e^{-(x'-b)/a}}+d$$
Then the horizontal asymptotes as $x\to \pm \infty$ are $y'=c+d$ and $y'=d$.
Your conditions, $f(0.15)=0.25$ and $f(0.25)=0.75$ provide two constraints. These alone won't fix the four unknowns. Supposing you still want the horizontal asymptotes to be $y=0$ and $y=1$, then we get $y'=y$. When $y=0.25$, $x=-\ln 3$, and when $y=0.75$, $x= \ln 3$, so
\begin{align*} 0.15&=-\ln 3\,a+b\\ 0.25&=\ln 3\,a+b \end{align*} Adding these gives $2b=0.4$ so $b=0.2$ and $a=0.05/\ln 3\cong 0.0455$.
$$y'=\frac{1}{1+e^{4\ln 3-20\ln 3\,x'}}$$
which can be written
$$y'=\frac{1}{1+3^{4-20x'}}$$