ae_stats.py 文件源码

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

项目:fitr 作者: abrahamnunes 项目源码 文件源码
def param_ttest(X, Y):
    """
    Two-sample t-test for difference between parameters (actual and estimated)

    Parameters
    ----------
    X : ndarray(shape=(n_subjects, nparams))
    Y : ndarray(shape=(n_subjects, nparams))

    Returns
    -------
    res : ndarray(shape=(n_params, 2))
        (t-statistic, p-value)

    Notes
    -----
    Arrays ``X`` and ``Y`` must be the same size
    """
    nparams = np.shape(X)[1]
    res = np.zeros([nparams, 2])

    for j in range(nparams):
        res[j, :] = ttest_ind(X[:,j], Y[:,j])

    return res
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号