Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculating P(t_k | !c) when there more than two classes? #10

Open
mbaroody opened this issue Mar 28, 2016 · 2 comments
Open

Calculating P(t_k | !c) when there more than two classes? #10

mbaroody opened this issue Mar 28, 2016 · 2 comments

Comments

@mbaroody
Copy link

For the purposes of this project, classification is easy. When we are calculating the ratio score for a 'spam' document, for example, 'not spam' is simply 'ham.' But how do we calculate the conditional probabilities when there are multiple labels that are 'not spam?'

@karthikbmk
Copy link

sum over all other classes:

P(t_k|Ck) / P(t_k|C1) + P(t_k|C2).....P(t_k|Ck-1)+P(t_k|Ck+1)+...P(t_k|Cn)

@aronwc
Copy link
Member

aronwc commented Mar 29, 2016

Correct, but you just need the denominator, i.e.:
Sum( P(t_k|c_j) ) for all c_j != c

On Mar 28, 2016, at 5:52 PM, Karthik [email protected] wrote:

sum over all other classes.

P(t_k|Ck) / P(t_k|C1) + P(t_k|C2).....P(t_k|Ck-1)+P(t_k|Ck+1)+...P(t_k|Cn)


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants