Пример #1
0
 def getReplacementPotential(self):
     '''how useful is it to start a new classi from this node including it's redichotomisation'''
     ###gotta think it through!
     v = len(self.samples)
     if self.isTerminal:
         v *= helpers.getBoolEntropy(self.samples,self.keyStatements)
     else:
         v *= helpers.getInformationGain(self.samples,self.dichotomy,self.keyStatements)- self.getInformationGain(self)
     return v
Пример #2
0
 def getInformationGain(self):
     '''information gain of a given dichotomy for the last update'''
     assert (not self.isTerminal)
     return helpers.getInformationGain(self)