[rojak-analyzer] RojakSVM for Sentiment Classification#127
Merged
Conversation
imrenagi
pushed a commit
to imrenagi/rojak
that referenced
this pull request
Sep 13, 2017
* add .gitignore * Add RojakSVM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rojakmenggunakan SVM based sentiment classifier.Step pertama, kita transform general problem multi-label nya jadi multi-class sih. Intuisinya seperti ini:
kan kita punya data yang udah di label
{pos,neg}_cagubdll kan. Dari label itu labelnya kita ubah menjadi lebih sederhana dengan menggunakan label pasangan cagub-cawagub saja. MisalStep kedua, pembuatan classifier. Disini kita buat classifier yang tugasnya:
Contoh classifier untuk pasangan cagub-cawagub anies-sandi, tugas classifier ini membedakan 3 class:
pos_anies_sandi,neg_anies_sandidanoot.Eksekusi
Dari data ini sentiment_classification_data.csv.zip
Hasil dari dumb evaluation-nya make sense sih. Jadi kita train dan eval dengan dataset yang sama hasilnya seperti ini:
Kalau kita perhatikan dari testnya itu:
dia punya confident score diatas
0.65untuk memprediksi berita http://m.detik.com/news/berita/d-3315862/ogah-ikut-perang-statement-di-pilgub-dki-agus-menghabiskan-energi