stats.py 文件源码

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

项目:BigBrotherBot-For-UrT43 作者: ptitbigorneau 项目源码 文件源码
def F_value_multivariate(ER, EF, dfnum, dfden):
    """
    Returns an F-statistic given the following:
    ER  = error associated with the null hypothesis (the Restricted model)
    EF  = error associated with the alternate hypothesis (the Full model)
    dfR = degrees of freedom the Restricted model
    dfF = degrees of freedom associated with the Restricted model
    where ER and EF are matrices from a multivariate F calculation.
    """
    if type(ER) in [IntType, FloatType]:
        ER = N.array([[ER]])
    if type(EF) in [IntType, FloatType]:
        EF = N.array([[EF]])
    n_um = (LA.det(ER) - LA.det(EF)) / float(dfnum)
    d_en = LA.det(EF) / float(dfden)
    return n_um / d_en

#####################################
#######  ASUPPORT FUNCTIONS  ########
#####################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号