plt draw 1 / (1 + np.exp(-x))

x = np.linspace(-20,20,10000)
y = np.array(1 / (1 + np.exp(-x)))
y1 = np.array(1 / (1 + np.exp(-x)) ** 0) / 2.0
plt.plot(x,y)
plt.plot(x,y1)
plt.axhline(y=0.7,ls="-",c="red")
plt.axis([-20,20,-0.1,1])
plt.show()

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_46815330/article/details/115317901