Folder tree:

|   GetTitle.py
|   MultinomialNB.py
|   NaiveBayes.ipynb
|   NaiveBayes.py
|   ProcessDataClass.py
|   README.md
|   vectorized_url.pickle
|
+---data
|       URL Classification.csv
|
+---results
|       confusion_matrix_test.png
|       confusion_matrix_train.png
|       visualize.png
|
\---__pycache__

Libraries

  • seaborn
  • numpy
  • matplotlib
  • time
  • sklearn.metrics
  • sklearn.model_selection
  • nltk
  • scipy
  • math
  • pickle
  • wordninja

Naive Bayes

cd naive-bayes-url-classification
python NaiveBayes.py

Notebook

To get more information from this project, please read my notebook at:

https://github.com/nhhviet98/naive-bayes-url-classification/blob/master/NaiveBayes.ipynb