Commits

Slavko Zitnik committed 95bec8e

Resolved Multinomial Bayes problem in line 1646, added: "if self.p_cond[c].has_key(w):".

  • Participants
  • Parent commits ca2fddd

Comments (0)

Files changed (1)

       for c in range(len(self.domain.classVar.values)):
          for i,g in example.getmetas(7).items():
             w = g.variable.name
-            fr = g.value         
-            p[c] += (fr * self.p_cond[c][w])
+            fr = g.value    
+     		if self.p_cond[c].has_key(w):
+            	p[c] += (fr * self.p_cond[c][w])
 
       maxp = max(p)