Views
No views yet
| Metric | Score |
|---|---|
| Accuracy | 0.7793 |
| F1-Score | 0.7901 |
| Precision | 0.8085 |
| Recall | 0.7793 |
1{
2 "model_name": "XGBoost",
3 "embedding_model": "Lajavaness/bilingual-embedding-small",
4 "n_estimators": 5000,
5 "max_depth": 4,
6 "learning_rate": 0.1,
7 "subsample": 0.8,
8 "colsample_bytree": 0.8,
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.9192 | 0.8197 | 0.8666 | 45859 |
| Mixed | 0.4403 | 0.6047 | 0.5096 | 12697 |
| Negative | 0.7884 | 0.7972 | 0.7928 | 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/wm-grsa-bilingual-xgboost}
}