Bernoulli distribution
Bernoulli distribution is used for discrete probability calculation. It either calculates success or failure. Here the random variable is either 1 or 0 whose chance of occurring is either denoted by p or (1-p) respectively.
The mathematical formula is given
Now in the above function if, we put x=1 then the value of f(x) is p and if we put x=0 then the value of f(x) is 1-p. Here, p denotes the success of an event.
Bernoulli Naive Bayes
Supervised learning is a subcategory of machine learning algorithms. In this way, the models are trained on labeled datasets. Under supervised learning, there are two categories: one is classification, and the other is regression. Classification is used for discrete prediction, while regression is used for continuous value prediction.