test_loss_functions.py 文件源码

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

项目:risk-slim 作者: ustunb 项目源码 文件源码
def generate_binary_data(n_rows = 1000000, n_cols = 20):
    X = np.random.randint(low=0, high=2, size=(n_rows, n_cols))
    Y = np.random.randint(low=0, high=2, size=(n_rows, 1))
    pos_ind = Y == 1
    Y[~pos_ind] = -1
    Z = X * Y
    Z = np.require(Z, requirements=['F'], dtype=np.float64)
    return Z
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号