DecisionTree.py 文件源码

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

项目:MLLearning 作者: buptdjd 项目源码 文件源码
def data2Vector(self):
        vec = DictVectorizer()
        dummy_x = vec.fit_transform(self.feature_list).toarray()
        lb = LabelBinarizer()
        dummy_y = lb.fit_transform(self.label_list)
        return dummy_x, dummy_y

    # here the decision tree use the algorithm which we call ID3, ID3 will use
    # information gain as feature select
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号