What is Naive Bayes?

https://miro.medium.com/max/1200/0*3lDbc8_4R4LrcyNy

Original Source Here

What is Naive Bayes?

An introduction to machine learning algorithms

Naive Bayes algorithm is a supervised learning algorithm(probabilistic machine learning algorithm), which is based on Bayes theorem, used in a wide variety of classification tasks in machine learning.

In this article, I would be giving you a detailed explanation and how this model works.

What is Naive Bayes?

Naive Bayes is primarily used in text classification with a large training dataset. The Naive Bayes Classifier is a simple and effective classification algorithm that aids in the development of fast machine learning models that can make accurate predictions. It’s a probabilistic classifier, which means it makes predictions based on the likelihood of an object. The Nave Bayes Algorithm is commonly used for spam filtration, sentiment analysis, and article classification.

What is Bayes Theorem?

The Bayes’ Theorem is a simple formula that can be used to calculate conditional probabilities.
conditional probability — A measure of the possibility of an event occurring if another event has already occurred is called conditional probability (by assumption, presumption, assertion, or evidence).

Posterior probability (P(A|B)): is the probability of hypothesis A on the observed event B.

Likelihood probability P(B|A): stands for Likelihood, which is the probability of the evidence provided that a hypothesis’ probability is true.

Prior Probability (P(A)): is the probability of a hypothesis before seeing the evidence.
Marginal Probability P(B): stands for Probability of Evidence Marginal Probability.

Which tells us how likely A is if B occurs, written P(A|B), also known as posterior probability. When we know how often B occurs when A occurs, written P(B|A), and how likely A is on its own, written P(A), and how likely B is on its own, written P(B), we can write P(B|A) (B).

Working of Naive Bayes’ Classifier:

Working of Naive Bayes’ Classifier can be understood with the help of the below example:

Assume we have a dataset of weather conditions and a target variable called “Play.” So, utilising this dataset, we must select whether or not to play on a specific day based on the weather circumstances. To fix this problem, we must take the following steps:

Convert the given dataset into frequency tables.

  1. Find the probability of given features to generate a Likelihood table.
  2. Calculate the posterior probability using Bayes’ theorem.

Types of Naive Bayes Model:

There are three types of Naive Bayes Model, which are given below:

  • Gaussian: The Gaussian model assumes that traits are regularly distributed. The model implies that continuous values are drawn from a Gaussian distribution if predictors take continuous values rather than discrete values.
  • Multinomial: When the data is multinomial distributed, the Multinomial Nave Bayes classifier is utilised. It’s mostly used to tackle document classification problems, such as determining which category a document belongs to, such as Sports, Politics, or Education.
  • Bernoulli: The Bernoulli classifier is identical to the Multinomial classifier, with the exception that the predictor variables are independent Booleans variables. Determine whether a given word appears in a document, for example. For jobs involving document classification, this paradigm is well-known.

Advantages of Naive Bayes Classifier:

  • Nave Bayes is a fast and simple machine learning technique for predicting a class of datasets.
  • It’s suitable for both binary and multi-class classifications.
  • In comparison to the other Algorithms, it performs better in Multi-class predictions.
  • It is the most popular choice for text classification problems.

If you like my article and efforts towards the community, you may support and encourage me, by simply buying coffee for me

Conclusion

so I hope today you guys have a good understanding in the near future Naive Bayes I would be making more articles in which I will be explaining moremodels and would be making an article to make implement Naive Bayes with source code.

AI/ML

Trending AI/ML Article Identified & Digested via Granola by Ramsey Elbasheer; a Machine-Driven RSS Bot

%d bloggers like this: