glmnetPlot.py 文件源码

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

项目:glmnet_py 作者: hanfang 项目源码 文件源码
def nonzeroCoef(beta, bystep = False):
    result = scipy.absolute(beta) > 0
    if len(result.shape) == 1:
        result = scipy.reshape(result, [result.shape[0], 1])
    if not bystep:
        result = scipy.any(result, axis = 1)

    return(result)
# end of nonzeroCoef()
# =========================================
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号