Join the conversation
Done
Reply
I have done this lecture.
Reply
Done this video.
Reply
AOA, I learned in this lecture about the Naïve Bayes algorithm (NB) for best model selection, which is used for classification tasks ( spam filtering, basic image classification, text-based sentiment analysis), which isNAIVE BAYES (NB) ALGORITHM:
What is it?
Simple but surprisingly powerful algorithm for predictive modeling and machine learning.
Based on Bayes’ Theorem.
Particularly useful in classification tasks.Bayes’ TheoremAt its core, Bayes’ Theorem provides a way to calculate the probability of a hypothesis given our prior knowledge.
Mathematically. It is expressed as:P(A|B) = P(B|A)xP(A) / P(B)Where:P(A|B) is the probability of hypothesis A given the data B.
P(B|A) is the probability of the data B given that hypothesis A is given the data.
P(A) is the probability of hypothesis A being true ( regardless of the data ).
P(B) is the probability of the data ( regardless of the hypothesis)Bayes’ Theorem Example:Imagine you’re a teacher with a class of students, and you know the following information:
60% of the students own a bicycle.
You also know that of those students who own a bicycle, 30% bring their bicycle to school.
Of those students who do not own a bicycle, 10% bring a bicycle to school (maybe they borrow one).Now, if you see a student with a bicycle at school, what is the probability that the student owns a bicycle?Here, we apply Bayes’ Theorem. Let’s denote:A as the event “Student owns a bicycle.”
B as the event “student brings a bicycle to school.”We know:P(A) = 0.60 ( probability that a student owns a bicycle )
P(B|A) = 0.30 ( probability that a student brings a bicycle to school given that they own one )
P(B|-A) = 0.10 ( probability that a student brings a bicycle to school given that they do not own one )We want to find P(A|B), the probability that a student owns a bicycle given that they brought one to school.Bayes’ Theorem states:P(A|B) = P(B|A)xP(A) / P(B)The tricky part is calculating P(B), the probability that a student brings a bicycle to school. We can compute it using the Law of Total probability:P(B) = P(B|A) x P(A) + P(B|-A) x P(-A)
Plugging in the known values:P(B) = 0.30 x 0.60 + 0.10 x 0.40 = 0.18 + 0.04 = 0.22Now we can find P(A|B):P(A|B) = 0.30 x 0.60 / 0.22 = 0.82so, if you see a student with a bicycle at school, there’s approximately an 82% chance that they own the bicycle.ALLAH PAK aap ko sahat o aafiyat wali lambi umar ata kray aor ap ko dono jahan ki bhalian naseeb farmaey aur aap ke walid-e-mohtram ko karwat karwat jannat ata farmaye,Ameen.
Reply
The new algorithm discussed is Naive Bayes. I learned the definition, formula, and a mathematical example solution of the Naive Bayes Algorithm.
Reply