reduce cutoff weight for prettier descriptions?
authorJess <jessicatz.fairymeadow@gmail.com>
Mon, 25 Aug 2014 22:18:28 +0000 (00:18 +0200)
committerJess <jessicatz.fairymeadow@gmail.com>
Mon, 25 Aug 2014 22:18:28 +0000 (00:18 +0200)
mlpccg/DeckList.py

index 0e0cba1f6d5ea3a07ca905bb85b127a92ad7c054..415c91d561cc6bb1a6f238916d8cedc4e8518227 100644 (file)
@@ -35,13 +35,12 @@ class DeckList:
         aspects_sorted = sorted(aspects.iteritems(), reverse=True, key=operator.itemgetter(1))
         aspects_sum = float(sum([aspect[1] for aspect in aspects_sorted]))
         aspects_filtered = []
-        cutoff = 0.66
+        cutoff = 0.5
         amount = 0.0
         for aspect, value in aspects_sorted:
             amount += value / aspects_sum
-            if amount < cutoff:
-                aspects_filtered += [aspect]
-            else:
+            aspects_filtered += [aspect]
+            if amount >= cutoff:
                 break
 
         return (mane, aspects_filtered)