It's a shame nobody ever answered this question years ago when asked. As an exercise for myself I will attempt it.
There's a useful answer with some python here: https://stackoverflow.com/a/43213692/1335793 That shows some varied parameterisations to shift or scale the curve.
In your examples, these two are equivalent:
$w = w.max / 1 + e ^-k (t - tm)$
$y = C / 1 + Ae ^-Bx$
In the first one, the sigmoid is applied to growth over time, so the x axis is assumed to be time. t-tm
is the difference between the start time and some point later in time, which is really the same as an x coordinate. So t-tm
is the same as x
in the second formula.
What IS (B) actually representing here?
B is positive or negative growth rate. If you make it negative, the curve will be a mirrored, i.e. it will start high and get lower over time. If it is positive the curve will start low and grow higher over time. In the paper you linked http://www.cs.xu.edu/math/math120/01f/logistic.pdf the first page shows a positive growth curve, the second page a negative curve. There is a relationship between the growth rate and the inflection point. If you modify the value of the growth rate, it changes the steepness of the slope in the middle of the curve. The paper explains that if you know the inflection point you can then back-calculate the growth rate.
And how, why, and where did they assign it the value of 0.0266 ???
This is a bit frustrating to learn about, as it seems arbitrary and in fact it is to some extent. They started with the data points, and then recognized that they kind-of followed a logistic distribution, and then attempted to "fit" the right function to the data by modifying the parameters of the logistic function. This is usually done with computational methods like ordinary-least-squares or gradient-descent, which are akin to starting with a random guess, then changing it slightly until the curve is as close to each of the data points as is possible within the constraints of the chosen function. It could just as well be done by trial-and-error, mucking around with the parameters until it looks right. If that doesn't feel very elegant then you would be right, it is a practical brute-force approach to applied mathematics.
And lastly, how can we determine what parameters to use for a sigmoid
function?
The convention for functions that describe curves in two dimensions is to use some form of
$y = f(x)$
where the $y$ coordinate is calculated by applying some function to the $x$ coordinate. This assumes you know what all the $x$ coordinates are, but that is not a problem for idealized functions like the logistic (sigmoid distribution). In the growth-of-population example, you know that time is continuous and the unknown is "what will the population be at any point in time?". Using the known (time) value you can then try to predict the unknown (population) value.
Choosing the syntax to use doesn't really matter that much, although it does help to use conventions, or for specific examples some variables that have meaning in the context. In the generic formula
$y = C / 1 + Ae ^-Bx$
$y$ will be the population value, $C$ will be the highest possible population value, and $e$ is Euler's number.
The generic logistic model is symmetrical around 0 but can be shifted left-right (x axis offset), up-down (y-axis offset), scaled (amplitude) or "stretched", changing the slope of the growth. You need to add additional parameters to the model to control those aspects, which makes the model describe your observed data. The approach of starting with a generic model and customizing it to data needs to balance goodness of fit
with complexity (not too many parameters). The process of model selection within the field of statistical modelling is dedicated to doing just that.
I recently developed a sigmoidal function that is based on the Superparabola as a differentiable model for the Heaviside step function. It has the following attributes:
It is complete in a finite regime (i.e., the ends are absolute rather than asymptotic).
It is fully differentiable over the entire regime.
- Parametrically, it can vary between a ramp function and a step function.
In addition, it can be moved and scaled as required. Without any further ado, the function is given by
$$f\left( x \right)=\frac{1}{2}\left[ 1+\text{sgn} (x)\,\frac{B\left( {1}/{2}\;,p+1,{{\left| x \right|}^{2}} \right)}{B\left( {1}/{2}\;,p+1 \right)} \right]$$
where the numerator and denominator $B$s are the incomplete and complete beta functions, respectively. When $p=0$ you get the ramp function and as $p\to\infty$ you get the step function. For all other $p$ you get a sigmoidal function with variable rise slope.
Also, note that the derivative of the incomplete beta function is given by
$$\frac{d}{dx}B(\nu,\mu,x)=x^{\nu-1}(1-x)^{\mu-1}$$
The figure below shows a typical sigmoidal function so-calculated (red) and the superparabola (blue) from which it was created by integration.
![Sigmoid function](https://i.stack.imgur.com/10iP1.png)
Best Answer
Define $g(x)=10\tanh(x/10)+\tanh(10x)$ and $f(x)=g(x-5)$.
$g(x)$:
$g'(x):$
$g''(x):$
$f(g(x)):$
Note that despite how the graphs look, all derivatives are obviously bounded.