Text Classification
Scikit-learn
Indonesian
sentiment-analysis
nlp
naive-bayes
e-commerce
indonesian
Instructions to use ZakyF/sentiment-analysis with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use ZakyF/sentiment-analysis with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("ZakyF/sentiment-analysis", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
| 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'] |