Skip to content

georgiggg/cs4375_project1

Repository files navigation

CS4375 Project 1 readme file of how to run it 
*THIS IS IN PYTHON*

1. Open VS Code and unzip the project folder

2. Open the folder in VS Code and open a new terminal

3. Run these commands in the terminal (Windows PowerShell):

Run this command to get to the main.py file location: cd cs4375_project1

4. To create a new venv (because i wanted to keep files separate from my other files in my computer):
python -m venv .venv

5. To activate the venv (if you get an error run the command below this and then rerun this command):
.\\.venv\\Scripts\\Activate.ps1

    Here I had an execution policy error but I got it fixed with the following command:
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

6. Install dependencies (numpy is used):
pip install -r requirements.txt

7. Create the 12 CSV files (BoW + Bernoulli):
python main.py build_csv --data_root datasets --out_dir outputs/csv

8. Train, tune, and evaluate into table results:
python main.py run --csv_dir outputs/csv --out_dir outputs/results

9. Verify and look at results with these 3 commands:
dir outputs\\results
start outputs\\results\\naive_bayes_results.csv
start outputs\\results\\logreg_results.csv


NOTE: My 12 CSVs are in the outputs folder.

About

Implements and compares Logistic Regression and two types of Naive Bayes (Multinomial Naive Bayes and Bernoulli Naive Bayes) models.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages