I wrote a logistic distribution using numpy.
import numpy as np
from matplotlib import pyplot as plt
sigma = 1.0
mu = 0
x = np.arange(-5., 5., 0.001)
y = np.exp(-(x-mu)/sigma) / (sigma*(1+np.exp(-(x-mu)/sigma))**2)
plt.plot(x, y)
plt.show()
Like this.
Cumulative distribution
import numpy as np
from matplotlib import pyplot as plt
sigma = 1.0
mu = 0
x = np.arange(-5., 5., 0.001)
y = 1. /(1 + (np.exp(-(x-mu)/sigma)))
plt.plot(x, y)
plt.show()
Normal distribution with numpy + matplotlib --Soleil cou coupé [Logistic distribution-Wikipedia](http://ja.wikipedia.org/wiki/%E3%83%AD%E3%82%B8%E3%82%B9%E3%83%86%E3%82%A3% E3% 83% 83% E3% 82% AF% E5% 88% 86% E5% B8% 83)
Recommended Posts