1. 程式人生 > >python pylab繪製Sigmoid影象

python pylab繪製Sigmoid影象

from pylab import *

t = arange(-60.0, 60.3, 0.1)
s = 1/(1 + exp(-t))
ax = subplot(212)
ax.plot(t,s)
ax.axis([-40,40,0,1])
plt.xlabel('x')
plt.ylabel('Sigmoid(x)')
show()