Views
No views yet
| Metric | Score |
|---|---|
| Accuracy | 0.8810 |
| F1-Score | 0.8790 |
| Precision | 0.8776 |
| Recall | 0.8810 |
1{
2 "model_name": "FacebookAI/roberta-base",
3 "max_length": 256,
4 "batch_size": 32,
5 "learning_rate": 2e-05,
6 "num_epochs": 5,
7 "warmup_steps": 0,
8 "weight_decay": 0.01,
9 "subset": 1.0
10}1from pathlib import Path
2import pickle
3
4# Load the model components
5model_dir = Path("path/to/model")
6
7with open(model_dir / 'vectorizer.pkl', 'rb') as f:
8 vectorizer = pickle.load(f)
9
10with open(model_dir / 'classifier.pkl', 'rb') as f:
11 classifier = pickle.load(f)
12
13with open(model_dir / 'label_encoder.pkl', 'rb') as f:
14 label_encoder = pickle.load(f)1# Example reviews
2reviews = [
3 "This game is absolutely amazing! Best game I've played this year.",
4 "It's okay, nothing special but not terrible either.",
5 "Terrible game, waste of money and time."
6]
7
8# Transform and predict
9X = vectorizer.transform(reviews)
10predictions_encoded = classifier.predict(X)
11predictions = label_encoder.inverse_transform(predictions_encoded)
12
13print(predictions)
14# Output: ['positive', 'mixed', 'negative']
15
16# Get probabilities
17probabilities = classifier.predict_proba(X)
18print(probabilities)| Class | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| Positive | 0.9359 | 0.9489 | 0.9423 | 45859 |
| Mixed | 0.6820 | 0.6166 | 0.6476 | 12697 |
| Negative | 0.8683 | 0.8932 | 0.8806 | 20181 |
results.json for the complete feature importance analysis.vectorizer.pkl: TF-IDF vectorizerclassifier.pkl: Trained classifierlabel_encoder.pkl: Label encoder for sentiment classesconfig.json: Model configurationresults.json: Complete training results and metrics@misc{game_review_sentiment,
author = {Game Review Sentiment Analysis Project},
title = {Sentiment Analysis Model for Game Reviews},
year = {2025},
url = {https://huggingface.co/roberta}
}