wordsim.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:conceptnet5 作者: ymmah 项目源码 文件源码
def confidence_interval(rho, N):
    """
    Give a 95% confidence interval for a Spearman correlation score, given
    the correlation and the number of cases.
    """
    z = np.arctanh(rho)
    interval = 1.96 / np.sqrt(N - 3)
    low = z - interval
    high = z + interval
    return pd.Series(
        [rho, np.tanh(low), np.tanh(high)],
        index=['acc', 'low', 'high']
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号