Created
February 3, 2018 15:28
-
-
Save farma11/9d37d4dd3f1317d0d80a5cd8ea29b64d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pylab as plt | |
def sigmoid(x): | |
return 1 / (1 + np.exp(-x)) | |
x = np.arange(-5.0, 5.0, 0.1) # -5.0から5.0まで0.1刻みで生成 | |
y = sigmoid(x) | |
plt.plot(x, y) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment