Orange Forum • View topic - orngBayes.printModel() outputs P(c|a_i) instead of P(a_i|c)?

orngBayes.printModel() outputs P(c|a_i) instead of P(a_i|c)?

A place to ask questions about methods in Orange and how they are used and other general support.

orngBayes.printModel() outputs P(c|a_i) instead of P(a_i|c)?

Postby tudsy » Mon Jun 28, 2010 9:54

I was expecting that the printModel function in orngBayes would print out the values P(a_i|c) (c=class, a_i=attribute #i) but it is printing out the values P(c|a_i). I.e., the rows sum to 1 instead of the columns summing to 1. Obviously, the P(a_i|c) are what's needed for the naive bayes classification.

The example show() function in bayes.py from http://www.ailab.si/orange/doc/ofb/c_pythonlearner.htm behaves as I'd expect.

The classifier is still classifying as expected, but I'd like to be able to get at the conditional probabilities P(a_i|c) and I can't seem to find them.

Any insight is appreciated. Thanks for the great software package!

Return to Questions & Support