trees.py 文件源码

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

项目:pylearning 作者: amstuta 项目源码 文件源码
def __init__(self, max_depth=-1, min_leaf_examples=6, max_split_features="auto"):
        self.root_node = None
        self.max_depth = max_depth
        self.min_leaf_examples = min_leaf_examples

        if max_split_features in ["auto","sqrt","log2"] or \
            isinstance(max_split_features, int) or max_split_features is None:
            self.max_split_features = max_split_features
            self.considered_features = None
        else:
            raise ValueError("Argument max_split_features must be 'auto', \
                            'sqrt', 'log2', an int or None")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号