apurvakokate / NaiveBayes-Classifier

Java program for classification of Documents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Naive Baysian Classifier:


*How to run program:
1. Make sure the java file is in the same folder as the data files
2. If you are in another directory, change directory to the folder containing the files 
 example: cd E:\573 lab01\20newsgroups\20newsgroups\573lab01\src\Submission
3. Compile using javac NaiveBayes.java
4. Run using java NaiveBayes vocabulary.txt map.csv train_label.csv train_data.csv test_label.csv test_data.csv
5.
you will see the following options: 

Enter choice:
 1:Multinomial Model
 2:Evaluation of Model
 3:Performance on training
 4:Performance on testing
 5:exit

6. Choose OPTION 1 FIRST. IT CREATES THE MODEL
7.you can choose other options now and press 5 to exit


* Pleasee check Sample output document in case this doesnt work
*Possible error: java Memory Error, filenotfound exception

About

Java program for classification of Documents


Languages

Language:Java 100.0%