摘要: 在实现决策树的ID3算法时,编写了计算信息熵的函数,运行后遇到了如下的问题: 对应处的代码为: @staticmethod def calc_ent(datasets): data_length = len(datasets) label_count = {} for i in range(data 阅读全文
posted @ 2022-02-24 11:30 Sunshine_y 阅读(945) 评论(0) 推荐(0) 编辑