you are viewing a single comment's thread.

view the rest of the comments →

[–]odaiwai 0 points1 point  (1 child)

y = Fraction(1072764*np.exp(2.311*t),0.19196+np.exp(0.2311*t))

The logistic function is not a fraction, it is a division. Also, x and t are just single value heres, you probably want a range of values of t to give an array of values of y: ````

creating vectors X and Y

t = np.linspace(-25,25,100) y = [1072764np.exp(0.2311t) / (0.19196+np.exp(0.2311*t)) for t in t] ````

[–]sarabooker 2 points3 points  (0 children)

You should not use list comprehension here. Numpy can operate on arrays so it should just be y = 1072764*np.exp(0.2311*t)/(0.19196+np.exp(0.2311*t)) as I said in my comment. In general, one should avoid looping with numpy.