Sei sulla pagina 1di 17

Naive

Bayesian
What is it?
● Statistical method for classification.
● Supervised Learning Method.
● Assumes an underlying probabilistic
model, the Bayes theorem.
● Can solve problems involving both
categorical and continuous valued
attributes.
● Named after Thomas Bayes, who
proposed the Bayes Theorem.
The Naive Bayesian classifier is based on Bayes’
theorem with the independence assumptions
between predictors. A Naive Bayesian model is easy
to build, with no complicated iterative parameter
estimation which makes it particularly useful for
very large datasets. Despite its simplicity, the Naive
Bayesian classifier often does surprisingly well and
is widely used because it often outperforms more
sophisticated classification methods.
Algorithm
likelihood Class prior 
posterior probability probability

P(x|c) P(c)
P(c|x)=
P(x)  Predictor prior 
probability
Graphical Model
P(x|c) P(c) P(Sunny|Yes) P(Yes)
P(c|x)= P(Yes|Sunny)=
P(x)  P(Sunny) 
P(x|c) P(c) P(No|Yes) P(No)
P(c|x)= P(No|Sunny)=
P(x)  P(No) 
Tpbrt
Another Example

● X : 35 year old customer with an income of


$40,000 and fair credit rating.
● C : Hypothesis that the customer will buy a
computer
I am 35
Will he buy a
years old
computer?

I earn $40,000

My credit
rating is fair
THE BAYES THEOREM
Bayes theorem gives the conditional probability of an event A given another
event B has occurred.
Bayes' theorem is a formula that describes how to update the probabilities of
hypotheses when given evidence.
● The Bayes Theorem:
○ P(C|X)= P(X|C) P(C)/ P(X)

● P(C|X) : Probability that the customer will buy a computer given that we know his age,
credit rating and income.
● P(C) : Probability that the customer will buy a computer regardless of age, credit rating,
income
● P(X|C) : Probability that the customer is 35 yrs old, have fair credit rating and earns
$40,000, given that he has bought our computer
● P(X) : Probability that a person from our set of customers is 35 yrs old, have fair credit
rating and earns $40,000.
USES OF NAÏVE BAYES CLASSIFICATION

● Spam filtering
When dealing with spam the
theorem is used to calculate a
probability whether a certain
message is spam based on
words in the title and message.
USES OF NAÏVE BAYES CLASSIFICATION

● Medical diagnosis
Using medical profiles such
as age, sex, blood pressure
and blood sugar, chest pain,
ECG graph etc. It can predict
the likelihood of patients
getting a heart disease.
USES OF NAÏVE BAYES CLASSIFICATION

● Recommender System
Recommender Systems
apply machine learning
and data mining
techniques for filtering
unseen information and
can predict whether a user
would like a given resource
PROS CONS
● Computationally fast ● Relies on
● Simple to implement independence
● Works well with high assumption and will
dimensions perform badly if this
● It’s easily trained, even with a assumption is not met
small dataset ● Will output a bad
● It’s not sensitive to irrelevant result if data is scarce
features
Reference

http://saedsayad.com/naive_bayesian.htm
http://rspa.royalsocietypublishing.org/content/465/2109/2927
https://www.slideshare.net/ashrafmath/naive-bayes-15644818
https://medium.com/@web2ajax/naive-bayes-for-idiots-bdab54716cf
https://github.com/ctufts/Cheat_Sheets/wiki/Classification-Model-Pros-and-Cons

Potrebbero piacerti anche