decision_tree_binner.py 文件源码

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

项目:dstk 作者: jotterbach 项目源码 文件源码
def _check_mdlp_stop(tree, node_id):
    """
    The MDLP implementation follows the paper of

        U. S. Fayyad and K. B. Irani, Multi-Interval Discretization of Continuous-Valued Attributes for Classification Learning, JPL TRS 1992
        http://hdl.handle.net/2014/35171
    """

    num_samples = tree.value[node_id].flatten().sum()

    gain = _calculate_gain(tree, node_id)
    delta = _calculate_noise_delta(tree, node_id)

    return gain < (delta + np.log2(num_samples - 1)) / num_samples
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号