In this article, we implement Naive-Bayes classifier from scratch, yeah — straight from scratch, no libraries. There might be number of libraries out there implementing this within one or two lines of code, but that’s not what we’re looking for here. This article is to strengthen your grasp on the topic, and how better to do that other than building from mud and clay? And one more thing, I won’t be focusing on the theory here, you may have a look at this if need to revise, gonna be an awesome read!

The scenario is such that, we’re given a csv data set of 10 patients in suspicion of being COVID-19 infected. We are given five health conditions viz. have fever?, have cough? have respiratory discomfort?, have runny nose? and have any throat ache — each denoted by 0 or 1. The last column is the tests result, also containing 0 for negative and 1 for positive.

#python #naive-bayes

Naive Bayes Classifier in Python, from scratch
10.40 GEEK