NourhanAbosaeed/Coursera_Reviews_Sentiment_Analysis_DistillBERT
This model is a fine-tuned version of distilbert-base-uncased on an a dataset from Cousera courses reviews, It is publicly available on Kaggle since 2017.
After data preprocessing and model training, It achieves the following results on the evaluation set:
- Train Loss: 0.4934
- Validation Loss: 0.6018
- Train Accuracy: 0.7498
- Epoch: 2
Considering the imbalanced nature of the data, metrics such as recall, precision, and F1 score were employed for evaluation:-
The model achieves these results on the test set:
precision recall f1-score support
0 0.37 0.59 0.46 1928
1 0.71 0.74 0.72 1022
2 0.91 0.79 0.85 8712
accuracy 0.75 11662
macro avg 0.67 0.71 0.68 11662
weighted avg 0.81 0.75 0.77 11662
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
After cleaning the data, It becomes 93291 training size, 11661 for validation and 11662 for test sets.
There are 3 lables positive, negative and netural.
The data have imbalanced nature so I have used class weights during training.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- optimizer: {'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': True, 'is_legacy_optimizer': False, 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 2e-05, 'decay_steps': 17490, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False}
- training_precision: float32
Training results
Train Loss | Validation Loss | Train Accuracy | Epoch |
---|---|---|---|
0.6870 | 0.6382 | 0.7505 | 0 |
0.5836 | 0.5976 | 0.7583 | 1 |
0.4934 | 0.6018 | 0.7498 | 2 |
Framework versions
- Transformers 4.35.1
- TensorFlow 2.14.0
- Datasets 2.14.7
- Tokenizers 0.14.1
- Downloads last month
- 4
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for NourhanAbosaeed/Coursera_Reviews_Sentiment_Analysis_DistillBERT
Base model
distilbert/distilbert-base-uncased