Guest User

Untitled

a guest
May 21st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. mean = 0
  2. variance = 1
  3. samples = 100000
  4.  
  5. # vectors
  6. a = np.random.normal(mean, variance, samples)
  7. b = np.random.normal(mean, variance, samples)
  8. c = np.random.normal(mean, variance, samples)
  9.  
  10. # weights
  11. weight_a = 0.3
  12. weight_b = 0.3
  13. weight_c = 0.4
  14.  
  15. result = (a * weight_a) + (b * weight_b) + (c * weight_c)
  16. print(np.mean(result), np.var(result))
  17. # 0.001295722463321136 0.34123206614565454
Add Comment
Please, Sign In to add comment