Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- def sigmoid(x, b, c):
- y = 1 / (1 + c*np.exp(-b*x))
- return y
- x_data = [4, 6, 8, 10]
- y_data = [0.86, 0.73, 0.53, 0.3]
- popt, pcov = curve_fit(sigmoid, x_data, y_data,(28.14,-0.25))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement