Thursday, September 12, 2024

Two papers got accepted in TENCON 2024

Two of my papers were accepted in TENCON 2024. Here is the list of title:

  1. Multi-label Emotion Share Regression From Speech Using Pre-Trained Self-Supervised Learning Models
  2. Evaluating Hyperparameter Optimization for Machinery Anomalous Sound Detection

The first paper talks about emotion (share) recognition, meaning how to predict more than a single emotion from utterance. It differs from general speech emotion recognition (SER), although we can select n highest probabilities from SER. In the former, the total of share should be 1 (or 100%). In the later, the probabilities of each emotion category is independence, i.e., each could have 0.85 and 0.75 of probabilities. Usually, the highest probabilities is selected.

Here is more details example.

Emotion (share) recognition

Angry: 0.54

Fear: 0.43

Other: 0.03

Speech emotion recognition

Angry: 0.64

Fear: 0.53

Sad: 0.23

In the first, the sum up of all probabilities is 1, this is not the case for the second approach (SER).

In the second article, I optimized anomalous machine sound detection via Optuna. The results on two different databases shows different value of optimal parameters; however, top three parameters to optimize remains same (learning rate, patiences, type of loss function).

 


Monday, September 02, 2024

Memahami F1-score dan penggunaannya (Binary dan Multiclass)

Dari Wikipedia

F-score (sebelum masuk ke F1 score) adalah harmonic mean (kebalikan arithmetic mean) dari precision dan recall. Jadi kalau (arithmetic) mean dari precision dan recall adalah (precision + recall) / 2 maka F-score adalah 2 * (1/precision + 1/recall) atau dapat ditulis dengan 

$$ F-score = 2 \frac{\text { precision } \cdot \text { recall }}{\text { precision }+ \text { recall }} = \frac{2 \mathrm{tp}}{2 \mathrm{tp}+\mathrm{fp}+\mathrm{fn}} $$ Dari rumus di atas terlihat bahwa nilai F-score bergantung pada tp (true positive), fp (false positive), dan fn (false negative).

Kemudian dengan menggunakan scikit-learn "classification report" saya mendapatkan hasil berikut:

Gambar 1. Output "classification report" dari scikit-learn

Mana diantara nilai F1-score (kotak merah) yang harus saya pakai/laporkan?

Dari Scikit-learn 

Keterangan lebih jauh tentang F1-score bisa dipelajari dari manual Scikit-learn. Ada beberapa nilai F1-score yang bisa dipakai yakni: binary, micro, macro, dan average. Untuk kasus saya (Gambar 1 atau dari output "classification report" secara umum), hanya ada tiga: binary (n atau p), macro, dan weighted. Berikut penjelasannya.
  • Binary, untuk binary classification, yang dilaporkan adalah F1-score untuk positive label, yakni 0.81 dengan mengambil label "p" sebagai label positif.
  • Macro avg, menghitung metrik untuk tiap label seperti rumus di atas, dan menghitung rata-ratanya (tanpa memperhitungkan jumlah sample/support).
  • Weighted avg, menghitung metrik untuk tiap label seperti rumus di atas dengan memperhitungkan jumlah sample/support.

Jadi mana yang harus dipakai/dilaporkan?


Berdasarkan keterangan Scikit-learn di atas maka:
  • Jika task adalah binary classification, yang dilaporkan adalah binary F1-score untuk positive label (yakni 0.81 atau 81% dari Gambar 1 di atas)
  • Jika task adalah multiclass, maka yang dilaporkan adalah weighted average (avg), contohnya 0.79 atau 79% dari Gambar 1 di atas.

Secara default, scikit-learn menggunakan label "1" untuk label positif jika argumen "pos_label" tidak diberikan. Saya curiga, dari sinilah asal kata F1-score bermula, yakni F-score untuk label "1" (atau bisa saja F-score untuk maksimal 1, tapi hampir semua metrik nilai maksimalnya adalah 1).
Related Posts Plugin for WordPress, Blogger...