Skip to content

Implement a Naive Bayes machine learning algorithm from scratch.

Notifications You must be signed in to change notification settings

foskyblue/naive_bayes_classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Naive_Bayes_Classifier

Table of Contents

  1. Installation
  2. Project Motivation
  3. File Descriptions
  4. Results

Installation

To run this project, you can clone this repository onto your local machine and run the main.py file. The version of python used is python 3.7.

Project Motivation

This is an AI school project where I and two group members Che Shao Chen and Yuan Zhang to implement a Naive Bayes algorithms form scratch.

File Descriptions

This project contains 4 Python files for the implementation.

  1. CountVectorizer : Responsible for computing the vector of frequency for each document.
  2. Main : Contains the main method, where program execution begin.
  3. NaiveBayes : Responsible for training and prediction.
  4. PreProcess : Responsible for processing the texts. Folds all characters to lowercase, then tokenize them using regular expression and uses the set of resulting words as the vocabulary.

Results

The main findings of the code can be found in the report folder.

About

Implement a Naive Bayes machine learning algorithm from scratch.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages