early_stopping.py 文件源码

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

项目:expan 作者: zalando 项目源码 文件源码
def obrien_fleming(information_fraction, alpha=0.05):
    """
    Calculate an approximation of the O'Brien-Fleming alpha spending function.

    Args:
        information_fraction (scalar or array_like): share of the information 
            amount at the point of evaluation, e.g. the share of the maximum 
            sample size
        alpha: type-I error rate

    Returns:
        float: redistributed alpha value at the time point with the given 
               information fraction
    """
    return (1 - norm.cdf(norm.ppf(1 - alpha / 2) / np.sqrt(information_fraction))) * 2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号