sigmoid#
- gaiaunlimited.selectionfunctions.sigmoid(G, G0, invslope, shape)#
Generalized sigmoid function.
Note: this function is not robust to numerical issues but works within the range of values we feed it.
- Parameters:
G (nd.array) – where to evaluate the function
G0 (float) – inflection point
invslope (float) – steepness of the linear part. Shallower for larger values
shape (float) – if shape=1, model is the classical logistic function, shape converges to zero, then the model is a Gompertz function.
- Returns:
evaluation of the model f(G) = 1 - (0.5 * (np.tanh(delta / invslope) + 1)) ** shape