Reza-Marzban / Naive-bayes-and-cross-validation-Nearest-Neighbour

Implementation of Naive Bayes, Gaussian Naive Bayes, and 5-fold cross-validation Nearest neighbor with pure python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Naive-bayes-and-cross-validation-Nearest-Neighbour

Implementation of Naive Bayes, Gaussian Naive Bayes, and 5-fold cross-validation Nearest neighbor with pure python.

The data that is used is MNIST dataset: http://yann.lecun.com/exdb/mnist/

main.py file have three functions:

Problem1: implements Naive Bayes on mnist for 10 classes (0-9), after making data binary. (creating a threshhold between 0 - 255)

Problem2: implement Gaussian Naive Bayes onmnist for two classes (5 or not 5), on actual data (from 0 - 255).

Problem3: Creates 5-fold Cross validation Nearest neighbour classifier on 3 classes (1,2,7) with different K and chooses best K for test set.

About

Implementation of Naive Bayes, Gaussian Naive Bayes, and 5-fold cross-validation Nearest neighbor with pure python


Languages

Language:Python 100.0%