Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def foo(x):
- med = [0.16748309770445646,
- 0.3358146063190391,
- 0.5002394192180806,
- 0.6627555994868011,
- 0.8335605975220853]
- maxs = [178, 290, 320, 220, 200]
- val = 0
- coefs = []
- for i in range(5):
- mu = med[i]
- sigma = 0.055
- val += med[i] * mlab.normpdf(x, mu, sigma) / 7.2501664 * maxs[i]
- coefs += [mlab.normpdf(x, mu, sigma) / 7.2501664 * maxs[i]]
- coefs = np.array(coefs)
- coefs = coefs / coefs.sum()
- return (coefs * med).sum()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement