Downloads · 30 days
0
nhull/logistic-regression-model
logistic-regression-model is a text classification model from nhull. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
This model is a Logistic Regression classifier trained on the TripAdvisor sentiment analysis dataset. It predicts the sentiment of hotel reviews on a 1-5 star scale. The model takes text input (hotel reviews) and outp…
Downloads · 30 days
0
Access
Public
Updated Jan 26, 2025
Repo size
1.6 MB
Likes
0
Public
Click a slice to open those files.
.csv7.8 MB · 91%
From the Hugging Face model README
This model is a Logistic Regression classifier trained on the TripAdvisor sentiment analysis dataset. It predicts the sentiment of hotel reviews on a 1-5 star scale. The model takes text input (hotel reviews) and outputs a sentiment rating from 1 to 5 stars.
This model is designed to classify hotel reviews based on their sentiment. It assigns a star rating between 1 and 5 to a review, indicating the sentiment expressed in the review.
The model will return a sentiment rating between 1 and 5 stars, where:
The dataset used for training, validation, and testing is nhull/tripadvisor-split-dataset-v2. It consists of:
All splits are balanced across five sentiment labels.
Model predicts too high on average by 0.44.
Test Accuracy: 61.05% on the test set.
Classification Report:
| Label | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| 1.0 | 0.70 | 0.73 | 0.71 | 1600 |
| 2.0 | 0.52 | 0.50 | 0.51 | 1600 |
| 3.0 | 0.57 | 0.54 | 0.55 | 1600 |
| 4.0 | 0.55 | 0.54 | 0.55 | 1600 |
| 5.0 | 0.71 | 0.74 | 0.72 | 1600 |
| Accuracy | - | - | 0.61 | 8000 |
| Macro avg | 0.61 | 0.61 | 0.61 | 8000 |
| Weighted avg | 0.61 | 0.61 | 0.61 | 8000 |
| True \ Predicted | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 1165 | 384 | 41 | 3 | 7 |
| 2 | 432 | 805 | 315 | 31 | 17 |
| 3 | 61 | 314 | 857 | 311 | 57 |
| 4 | 3 | 48 | 264 | 870 | 415 |
| 5 | 6 | 10 | 32 | 365 | 1187 |
validation_results_log_regression.csv: Contains correctly classified reviews with their real and predicted labels.