MACHINE LEARNING : BAYES THEOREM

Kartikeya Mishra
2 min readNov 29, 2019

Bayes’ Theorem finds the probability of an event occurring given the probability of another event that has already occurred. Bayes’ theorem is stated mathematically as the following equation:

Bayes Theorem

where A and B are events and P(B) ? 0.

  • Basically, we are trying to find probability of event A, given the event B is true. Event B is also termed as evidence.
  • * P(A) is the priori of A (the prior probability, i.e. Probability of event before evidence is seen). The evidence is an attribute value of an unknown instance(here, it is event B).
  • * P(A|B) is a posteriori probability of B, i.e. probability of event after evidence is seen.

MACHINE LEARNING : Naive Bayes Theorem

It is a classification technique based on Bayes’ Theorem with an assumption of independence among predictors. In simple terms, a Naive Bayes classifier assumes that the presence of a particular feature in a class is unrelated to the presence of any other feature.

For example, a fruit may be considered to be an apple if it is red, round, and about 3 inches in diameter. Even if these features depend on each other or upon the existence of the other features, all of these properties independently contribute to the probability that this fruit is an apple and that is why it is known as ‘Naive’.

Naive Bayes model is easy to build and particularly useful for very large data sets. Along with simplicity, Naive Bayes is known to outperform even highly sophisticated classification methods.

Bayes theorem provides a way of calculating posterior probability

P(c|x) from P(c), P(x) and P(x|c).

Look at the equation below:

Naive Bayes

Above,

  • P(c|x) is the posterior probability of class (c, target) given predictor (x, attributes).
  • * P(c) is the prior probability of class.
  • * P(x|c) is the likelihood which is the probability of predictor given class.
  • * P(x) is the prior probability of predictor.

--

--

Kartikeya Mishra

All about new technology in fun and easy way so that you can be confident in it and make your own piece of work using this knowledge !