distilbert-base-uncased-SpamFilter-DunnBC22

This model is a fine-tuned version of distilbert-base-uncased on the None dataset. It achieves the following results on the evaluation set:

  • Loss: 0.1007
  • Accuracy: 0.9907
  • F1: 0.9906

Model description

This is a binary classification of whether the inputs are spam or not.

For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Binary%20Classification/Spam%20Filter%20-%20Smaller%20Dataset/DunnBC22-distilbert-base-uncased-SpamFilter-sm.ipynb

Intended uses & limitations

This model is intended to demonstrate my ability to solve a complex problem using technology.

The main limitation is the quality of the data source.

Training and evaluation data

Dataset Source: https://www.kaggle.com/datasets/datatattle/email-classification-nlp

Input Word Length By Class:

Input Length in Words By Class

Confusion Matrix:

Confusion Matrix

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 128
  • eval_batch_size: 128
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 3

Training results

Training Loss Epoch Step Validation Loss Accuracy F1
0.5039 1.0 7 0.3920 0.8333 0.7576
0.3008 2.0 14 0.2010 0.9722 0.9719
0.113 3.0 21 0.1007 0.9907 0.9906

Framework versions

  • Transformers 4.21.1
  • Pytorch 1.12.1
  • Datasets 2.4.0
  • Tokenizers 0.12.1

License Notice

This model is a fine-tuned derivative of a pretrained model. Users must comply with the original model license.

Dataset Notice

This model was fine-tuned on third-party datasets which may have separate licenses or usage restrictions.

Downloads last month
3
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support