Guest User

Untitled

a guest
Jul 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. import pandas
  2. X = pandas.read_excel(open('excel.xlsx', 'rb'))
  3. Y = np.corrcoef (X)
  4.  
  5. for i in Y :
  6. if i >= 0.50:
  7. print ("POSITIVE CORRELATION")
  8. elif CC0 <= -0.50:
  9. print ("NEGATIVE CORRELATION")
  10. else :
  11. print ("NO CORRELATION")
  12.  
  13. X1 X2 X3 X4 X5
  14.  
  15. [[ 1. 0.76072577 0.86385074 -0.75301812 0.66995002]
  16. [ 0.76072577 1. 0.74206343 -0.47660312 0.64827257]
  17. [ 0.86385074 0.74206343 1. -0.93521563 0.93280718]
  18. [-0.75301812 -0.47660312 -0.93521563 1. -0.92556091]
  19. [ 0.66995002 0.64827257 0.93280718 -0.92556091 1. ]]
  20.  
  21. POSITIVE CORRELATION BETWEEN A AND B
  22. POSITIVE CORRELATION BETWEEN A AND C... etc.
Add Comment
Please, Sign In to add comment