File size: 1,325 Bytes
7a0def2 c5afc9a 7a0def2 809a4fe 7a0def2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
---
license: apache-2.0
datasets:
- ZakyF/PRDECT-ID
language:
- id
metrics:
- accuracy
evaluation:
- task:
type: text-classification
name: Sentiment Analysis
metrics:
- name: Accuracy
type: accuracy
value: 1.0
- name: Cross-Validation Accuracy
type: accuracy
value: 0.99981
pipeline_tag: text-classification
library_name: sklearn
tags:
- sentiment-analysis
- nlp
- naive-bayes
- e-commerce
- indonesian
---
# Sentiment Analysis
Model SVM dan Naive Bayes untuk mengklasifikasikan ulasan ke dalam kategori Bagus, Normal, atau Buruk menggunakan PRDECT-ID Dataset.
## Deskripsi
Model ini menganalisis ulasan pelanggan Tokopedia untuk menghasilkan insight seperti rekomendasi perbaikan pengiriman atau kualitas produk.
## Penggunaan
```python
import pickle
from sklearn.preprocessing import LabelEncoder, StandardScaler
# Load model dan preprocessing
svm_model = pickle.load(open('svm_model.pkl', 'rb'))
scaler = pickle.load(open('scaler.pkl', 'rb'))
le_sentiment = pickle.load(open('le_sentiment.pkl', 'rb'))
le_emotion = pickle.load(open('le_emotion.pkl', 'rb'))
# Contoh prediksi
data = [[5, 'Positive', 'Happy']] # Rating, Sentiment, Emotion
data_scaled = scaler.transform(data)
prediksi = svm_model.predict(data_scaled)
print(prediksi) # Output: ['Bagus'] |