An open API service indexing awesome lists of open source software.

https://github.com/sadmansakib93/naive-bayes

Implementation of Naive Bayes from scratch using Python
https://github.com/sadmansakib93/naive-bayes

artificial-intelligence bayes-classifier classification dataset machine-learning naive-bayes naive-bayes-algorithm naive-bayes-classification naive-bayes-classifier naive-bayes-implementation predictions python test-dataset training-dataset

Last synced: 4 months ago
JSON representation

Implementation of Naive Bayes from scratch using Python

Awesome Lists containing this project

README

        

# Naive-Bayes
Implementation of Naive Bayes from scratch using Python.

* This is a python implementation of Naïve Bayes Algorithm (m-estimate version) for a binary classification problem from scratch.
* The program will take two inputs: a training dataset and a test dataset.
* The value of m will be the number of possible values of a feature.
* All features will be categorical in the dataset.
* The last column of the datasets will be the class variable.
* The two-class values as positive and negative.
* The program will first load the training dataset, calculate all required probabilities, and then predict the class of each instance in the test set.
* The program will add a new column containing predicted classes to the test dataset and save it as predictions.csv.
* The program will also show the accuracy, sensitivity, and specificity on the console