Giter VIP home page Giter VIP logo

naivebayesclassifier's Introduction

NAIVE BAYES TEXT CLASSIFIER PACKAGE
============================================

This package implements a Naive-Bayesian classifier that classifies text documents into 20 categories based on 
Machine learning. The original data set is available at http://qwone.com/~jason/20Newsgroups/. In this package,
a processed version of the data set has been used. The package has been written using Python 3.6 and uses the NumPy
Library to structure the input data .

HOW TO RUN THE PACKAGE
============================================

1. Make sure you have Python installed in your system and the NumPy library has been included and updated. 

2. Have the 20newsgroups files in the same folder as the script naiveBayesClassifier.py 

3. run the code on the terminal (or cmd) as follows: 


$python naiveBayesClassifier.py vocabulary.txt map.csv train_label.csv train_data.csv test_label.csv test_data.csv testDataType estimatorType > outputFile.txt


	1. testDataType should be 0 if you want to test on training data. In this case, estimatorType is don't care. It will always test on 
	Bayesian Estimators

	2. testDataType should be 1 if you want to test on testing data. In this case, estimatorType should be 0 for Bayesian Estimators and 1
	for Maximum-Likelihood Estimators. 

for example: if you want to evaluate on testing data using Bayesian Estimators, your command should be:


$python naiveBayesClassifier.py vocabulary.txt map.csv train_label.csv train_data.csv test_label.csv test_data.csv 1 0 > outputFile.txt




©Saunak Saha 
====================
([email protected])

naivebayesclassifier's People

Contributors

saunak1994 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.