chh042 commited on
Commit
aef755d
·
verified ·
1 Parent(s): d894857

Upload 6 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ glove.6B.100d.txt filter=lfs diff=lfs merge=lfs -text
README.me ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Naive Bayes Text Classification with Pre-trained Model
2
+ This project demonstrates how to use a pre-trained Naive Bayes model and vectorizer for text classification. It includes data preprocessing, text vectorization, and evaluation of the model's accuracy on a given dataset.
3
+
4
+ Prerequisites
5
+ Make sure you have the following installed:
6
+
7
+ Python 3.7 or later
8
+ Required Python libraries:
9
+ pandas
10
+ nltk
11
+ scikit-learn
12
+ joblib
13
+ To install the necessary libraries, run: pip install pandas scikit-learn nltk joblib
14
+
15
+ The input data should be a CSV file (data.csv) located in the ./data directory. The file must include the following columns:
16
+
17
+ title: The text data to classify.
18
+ news: The target label, where fox will be encoded as 1 and all other values as 0.
19
+
20
+ Place your dataset in a CSV file named data.csv under the ./data directory.
21
+ Ensure it has the required columns (title and news).
22
+
23
+ open the jupyternotebook and run the Prediction section in beginning, the model will predict and compare the result with true answer, and accuracy score is printed.
data.csv ADDED
The diff for this file is too large to render. See raw diff
 
glove.6B.100d.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95dde4dfd627ab26608d33e76d1195ec059734bd29089ea52cadb08d07c64544
3
+ size 347116733
model.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
naive_bayes_model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:176077912301826601b529d7cded5bf155bd251205ba7f68eed04dde796e42cc
3
+ size 951671
vectorizer_bong.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8c0157f5d91c7b1949c74330ab6db6b1861f0734d8331b06ce18e18b055f85a
3
+ size 525558