機器學習實戰之決策樹的構建過程_代碼註釋

#-*- coding: UTF-8 -*- from math import log import operator def calcShannoEnt(dataSet):#計算香農熵 numEntries = len(dataSet) labelCounts = {} for featVec in dataSet: currentLabel = featVec
相關文章
相關標籤/搜索