test_conditional_inference_binner.py 文件源码

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

项目:dstk 作者: jotterbach 项目源码 文件源码
def test_adding_bin_with_non_numeric_splits_only():
    cib = ConditionalInferenceBinner('test', alpha=0.05)
    cib.splits = [np.PINF, np.NaN]
    cib.values = [[0.1, 0.9], [0.8, 0.2]]
    cib.is_fit = True

    cib.add_bin(-1.0, [0.3, 0.7])
    np.testing.assert_equal(cib.splits, [-1.0, np.PINF, np.NaN])
    np.testing.assert_equal(cib.values, [[0.3, 0.7], [0.1, 0.9], [0.8, 0.2]])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号