基于gini系数的决策树代码

import gini import tree import operator from math import pow def cal_gini_index(data): total_sample=len(data) if total_sample==0: return 0 label_counts=label_unique_cnt(data) gini=0 for label in label
相关文章
相关标签/搜索