OSDN Git Service

implement new calc of bayes suggestion.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Tue, 24 Nov 2009 21:54:07 +0000 (21:54 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Tue, 24 Nov 2009 21:54:07 +0000 (21:54 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@248 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/auto_rec.py

index f0ef76b..a257fa4 100644 (file)
@@ -75,11 +75,12 @@ def calc_key(chtxt,title,desc):
             tall=pp[3]
             tarec=pp2[2]
             taall=pp2[3]
-            if tall<=trec or taall<=tarec:
-                tnum=tnum+1
-                p=(1000*trec+5)*100/(1000*tall+5)
-                p2=(1000*tarec+5)*100/(1000*taall+5)
-                nump=nump+p+p2
+            tnum=tnum+1
+            p=(1000*trec+5)/(1000*tall+5)
+            p=p*p*100
+            p2=(1000*tarec+5)/(1000*taall+5)
+            p2=p2*100
+            nump=nump+p+p2
     if (nump/tnum)>kyoukai:
         return 1
     else: