Skip to content

Files

Latest commit

c0cd21f · Sep 14, 2021

History

History

lab3

CS561

Artifical Intelligence Lab

Indian Institute of Technology Patna

2021-22

Assignment 3

Team Details:

Team Code: 1801cs03_1801cs07_1801cs46

Team Name: MnMnM

Team Members:

Name Roll Number
Abhishek Chopra 1801CS03
Amish Mittal 1801CS07
Shashwat Mahajan 1801CS46

Notes

  1. Both Multivariate and Multinomial versions are implemented
  2. Add-one smoothing is implemented
  3. 5-fold cross validation result is calculated

Output

python main.py
5-fold accuracy for Multinomial Naive Bayes: 0.9807899461400359
5-fold accuracy for Multivariate Naive Bayes: 0.83770197486535

Instructions to run the code

  1. Install dependencies using pip install -r requirements.txt after creating a conda environment.

  2. Download the dataset from https://archive.ics.uci.edu/ml/machine-learning-databases/00228/smsspamcollection.zip. Extract it alongside the main.py file.

  3. Run:

python main.py 

Thanking You!

MnMnM