You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In _probabilities method, the probabilities might go over 1 for this case.
Consider there are three messages in our train dataset, of which one is ham and remaining two are spam.
the spam messages contain 'bitcoin' multiple times, let's say the count of word bitcoin in spam messages are 10.
In brief,
ham messages = 1
spam messages = 2
count of bitcoint token = 10
count of tokens in spam messages = { 'bitcoin': 10, 'testing': 2 }
count of tokens in ham messages = { 'a': 1, 'genuine': 1, 'mail': 1 }
P(bitcoin | spam):
=> Count of bitcoin in spam messages / total count of spam tokens
=> 10 / 12
=> 0.833
lokesh-vr-17773
changed the title
[Bug] Probabilities in naive bayes is greater than 1
[Bug] Incorrect implementation of conditional probability in Navie Bayes classifier
Jul 13, 2024
lokesh-vr-17773
changed the title
[Bug] Incorrect implementation of conditional probability in Navie Bayes classifier
[Bug] Incorrect implementation of conditional probability in Naive Bayes classifier
Jul 13, 2024
In
_probabilities
method, the probabilities might go over 1 for this case.Consider there are three messages in our train dataset, of which one is ham and remaining two are spam.
the spam messages contain 'bitcoin' multiple times, let's say the count of word
bitcoin
in spam messages are 10.In brief,
ham messages = 1
spam messages = 2
count of
bitcoint
token = 10then,
Since probabilities cannot go above 1, how should we interpret 3.5 in this case?
The text was updated successfully, but these errors were encountered: