utils.py 文件源码

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

项目:pyprocessmacro 作者: QuentinAndre 项目源码 文件源码
def fast_OLS(endog, exog):
    """
    A simple function for (X'X)^(-1)X'Y
    :return: A K-length array of estimated coefficients.
    """
    try:
        return dot(dot(inv(dot(exog.T, exog)), exog.T), endog).squeeze()
    except LinAlgError:
        raise LinAlgError
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号