Advertisement
Guest User

Untitled

a guest
Dec 11th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. def cov_bias(x):
  2. return sp.cov(x, rowvar=0, bias=1)
  3.  
  4. def cov_nonbias(x):
  5. return sp.cov(x, rowvar=0, bias=0)
  6.  
  7. for data in [class2X, class2X[0:len(class2X)/2], class2X[0:len(class2X)/4]]:
  8. print "Difference: ", (sp.absolute(cov_bias(data) - cov_nonbias(data)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement