SciPy 점이연상관계수

1 개요[ | ]

SciPy 점이연상관계수
from scipy import stats
x = [1,1,0,1,1,0,0,0]
y = [1,1,2,6,6,7,8,9]
pbr = stats.mstats.pointbiserialr(x,y)
print( pbr.correlation ) # -0.5
from scipy import stats
x = [0, 0, 0, 1, 1, 1, 1]
y = [0, 1, 2, 3, 4, 5, 6]
pbr = stats.mstats.pointbiserialr(x,y)
print( pbr.correlation ) # 0.866025403784

2 같이 보기[ | ]

3 참고[ | ]

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