transform.py 文件源码

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

项目:skutil 作者: tgsmith61591 项目源码 文件源码
def _estimate_lambda_single_y(y):
    """Estimate lambda for a single y, given a range of lambdas
    through which to search. No validation performed.

    Parameters
    ----------

    y : ndarray, shape (n_samples,)
       The vector being estimated against
    """

    # ensure is array
    y = np.array(y)

    # Use scipy's log-likelihood estimator
    b = boxcox(y, lmbda=None)

    # Return lambda corresponding to maximum P
    return b[1]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号