reverse sigmoid and its derivative I wonder, if someone could please check/help me with this simple code:
import numpy as np
import matplotlib.pyplot as plt

def sigmoid(x):
    var = -0.1
    shift = 10
    return np.exp(var*(x - 100)) / (1 + np.exp(var*(x - 100) ))
    # return 1 / (1 + np.exp(-x))

def derivative(x, step):
    return -5.0 * (sigmoid(x+step) - sigmoid(x)) / step

x = np.linspace(0, 200, 1000)

y1 = sigmoid(x)
y2 = derivative(x, 0.0000000000001)

plt.plot(x, y1, label='reverse sigmoid')
plt.plot(x, y2, label='derivative')
plt.legend(loc='upper right')
plt.show()

It is my basic attempt to plot the reverse sigmoid and its derivative inspired by other posts. The results look like so:

The derivative looks odd and ideally I want to inflate the height of its peak. Any help would be very much appreciated. Thanks!

You can compute the derivative of a sigmoid in closed form. If you have the function
$$
f(x) = \dfrac{1}{1 + \exp{(-\beta(x-\mu))}}
$$
(where in your case $\mu=100$ and $\beta = -0.1$ then its derivative is
$$f'(x) = \dfrac{-\beta\exp{(-\beta(x-\mu))}}{(1 + \exp{(-\beta(x-\mu))})^2}$$ This is found by simple application of the quotient rule
I'm not sure what you mean by "the derivative looks odd" (its actually quite "even", haha that is a math joke). The derivaitve is flat and close to zero where $f$ is not changing very much and it peaks at the steepest part of $f$ (that is when $x=\mu$).
