Skip to content

Commit

Permalink
New training with new data & new release
Browse files Browse the repository at this point in the history
  • Loading branch information
adamspd committed May 4, 2024
1 parent 3161949 commit b417ad4
Show file tree
Hide file tree
Showing 14 changed files with 10,284 additions and 6 deletions.
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
scikit-learn==1.4.2
imbalanced-learn==0.12.2
pandas==2.2.1
pandas==2.2.2
nltk~=3.8.1
setuptools==69.2.0
pytest==8.1.1
setuptools==69.5.1
pytest==8.2.0
requests~=2.31.0
imblearn~=0.0
joblib~=1.4.0
joblib~=1.4.2
xgboost~=2.0.3
2 changes: 1 addition & 1 deletion spam_detector_ai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
__description__ = "A package for detecting and filtering spam messages using Machine Learning models."
__package_name__ = "spam-detector-ai"
__url__ = "https://github.com/adamspd/spam-detection-project"
__version__ = "2.1.13"
__version__ = "2.1.14"
__test_version__ = False
10,275 changes: 10,275 additions & 0 deletions spam_detector_ai/data/spam.csv

Large diffs are not rendered by default.

Binary file modified spam_detector_ai/models/bayes/naive_bayes_model.joblib
Binary file not shown.
Binary file modified spam_detector_ai/models/bayes/naive_bayes_vectoriser.joblib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified spam_detector_ai/models/svm/svm_model.joblib
Binary file not shown.
Binary file modified spam_detector_ai/models/svm/svm_vectoriser.joblib
Binary file not shown.
Binary file modified spam_detector_ai/models/xgb/xgb_model.joblib
Binary file not shown.
Binary file modified spam_detector_ai/models/xgb/xgb_vectoriser.joblib
Binary file not shown.
5 changes: 4 additions & 1 deletion spam_detector_ai/tests/test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# spam_detector_ai/test_and_tuning/test.py

import os
import sys

from sklearn.metrics import accuracy_score, classification_report, confusion_matrix
from sklearn.model_selection import train_test_split
Expand All @@ -10,6 +11,8 @@
from spam_detector_ai.prediction.predict import SpamDetector
from spam_detector_ai.training.train_models import ModelTrainer

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))


class TestModel:
def __init__(self):
Expand All @@ -20,7 +23,7 @@ def __init__(self):
# Assuming the spam_detector_ai directory is one level up from the current directory
base_dir = os.path.dirname(current_dir)
data_path = os.path.join(base_dir, 'data/spam.csv')
self.initial_trainer = ModelTrainer(data_path=data_path, classifier_type=None, logger=self.logger)
self.initial_trainer = ModelTrainer(data_path=data_path, logger=self.logger)
self.processed_data = self.initial_trainer.preprocess_data_()

# Split the data once
Expand Down

0 comments on commit b417ad4

Please sign in to comment.