Permalink
Browse files

(cluster - fix line lengths)

Ignore-this: cfe739eae362297f473983c4b0e88c9

darcs-hash:20130715203659-3a4db-d19d53aac05e562ae9f6e098e1c326f7a99fe80e
  • Loading branch information...
1 parent 56d4223 commit fd98d1192ea0cd2f06808e8db49cc5816c54a993 @MattShannon committed Jul 15, 2013
Showing with 4 additions and 6 deletions.
  1. +4 −6 armspeech/modelling/cluster.py
@@ -150,7 +150,8 @@ def all(self):
d.addAcc(accTot, acc)
return accTot
- def getLeafToQgToValueToAcc(self, numLeaves, labelToLeafIndex, questionGroups):
+ def getLeafToQgToValueToAcc(self, numLeaves, labelToLeafIndex,
+ questionGroups):
leafToQgToValueToAcc = [
[
defaultdict(self.createAcc)
@@ -166,11 +167,8 @@ def getLeafToQgToValueToAcc(self, numLeaves, labelToLeafIndex, questionGroups):
pass
else:
for qgIndex, (labelValuer, _) in enumerate(questionGroups):
- labelValue = labelValuer(label)
- d.addAcc(
- leafToQgToValueToAcc[leafIndex][qgIndex][labelValue],
- acc
- )
+ valueToAcc = leafToQgToValueToAcc[leafIndex][qgIndex]
+ d.addAcc(valueToAcc[labelValuer(label)], acc)
return leafToQgToValueToAcc

0 comments on commit fd98d11

Please sign in to comment.