+ 6
How to plot curves with matplotlib
I am trying to plot the Sigmoid Function, is that possible?
2 Respuestas
+ 1
You can use numpy and matplotlib for that.
For this example:
import numpy as np
import matplotlib.plot as plt
def sigmoid(x):
return 1./(1+np.exp(-x))
x = np.linspace(-5,5,50) #prints 50 points from -5 to 5 in equal distance
y = sigmoid(x)
plt.plot(x,y)
plt.show()
for more Information consult the documentation of numpy and matplotplib (google)
+ 2
Thanks Matthias !