NO EXTENSION will be given for submission. You will be graded on the solution you have on the due date.
The assignment should be submitted via Canvas. Submit a file called Project2.zip containing the files listed under Deliverables:
The files expected in your submission folder are listed below. You will lose considerable points if any files are missing:
20_newsgroups_Train (All Train data in this folder)20_newsgroups_Test (All Test data in this folder)eliminate.txtBagofWords.txtnaive_bayes.ipynb or naive_bayes.Rmdneural_networks.ipynb or neural_networks.Rmdsupport_vm.ipynb or support_vm.RmdThis project involves classifying 20,000 messages into 20 categories using three algorithms: Naïve Bayes, Neural Networks, and Support Vector Machine (SVM). Proper formatting of the dataset is essential for success.
Download the Twenty Newsgroups Data Set and extract the 20_newsgroups.tar.gz file.
Split the dataset with 60% as training data and 40% as test data.
Training dataset folder: 20_newsgroups_Train
Test dataset folder: 20_newsgroups_Test
Create a dictionary (Bag of Words) containing unique words arranged by term weight.
eliminate.txt (5 points)BagofWords.txt.
Implement a function in Python or R to train and apply a Naive Bayes model. Use function structure:
naive_bayes(<training_path>, <test_path>)
Note: Implement the classifier without using any external libraries for Naive Bayes.
Implement a function in Python or R to train and apply a Neural Network model. Use function structure:
neural_networks(<training_path>, <test_path>)
Library: Any neural networks library is permitted. BONUS: 7 extra points for implementing without using a library.
Implement a function in Python or R to train and apply an SVM model.
support_vm(<training_path>, <test_path>)
Library: You may use libsvm or any other SVM library. BONUS: 7 extra points for implementing without using a library.
| Dictionary Size | Accuracy | Number of Misclassified | Recall | Running Time |
|---|---|---|---|---|
| 70,000 | ||||
| 50,000 | ||||
| 30,000 | ||||
| 10,000 |