基於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
相關文章
相關標籤/搜索