SciPy 스피어만상관계수

1 개요[ | ]

SciPy 스피어만상관계수
from scipy import stats

x = [1, 2, 2, 3, 4, 5, 6, 8, 9, 10]
y = [2, 3, 2, 5, 5, 7, 5, 6, 7, 8]
spearmanr = stats.mstats.spearmanr(x,y)
print( spearmanr.correlation ) # 0.913422140160786
from scipy import stats

x = [106,86,100,101,99,103,97,113,112,110]
y = [7,0,27,50,28,29,20,12,6,17]
spearmanr = stats.mstats.spearmanr(x,y)
print( spearmanr.correlation ) # -0.17575757575757575

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}