Anomali berlabel

Pengantar Deteksi Anomali di R

Alastair Rushworth

Data Scientist

Data citra satelit

head(sat, 5)
  label V1  V2  V3 V4 V5
1     0 92 115 120 94 84
2     0 84 102 106 79 84
3     0 84 102 102 83 80
4     0 80 102 102 79 84
5     0 84  94 102 79 80
Pengantar Deteksi Anomali di R

Data citra satelit

table(sat$label)
   0    1 
5732   71

Proporsi citra kapas:

71 / 5803
0.01223505
Pengantar Deteksi Anomali di R

Visualisasikan anomali nyata

plot(V2 ~ V3, data = sat, col = as.factor(label), pch = 20)

Pengantar Deteksi Anomali di R

Skor anomali vs. label nyata

sat_for <- iForest(sat[, -1], nt = 100)
sat$score <- predict(sat_for, features)

boxplot(score ~ label, data = sat, col = "olivedrab4")

Pengantar Deteksi Anomali di R

Mengapa tidak memprediksi label dengan model?

Contoh 1: Deteksi penyakit langka

  • Kasus terlalu sedikit

 

Contoh 2: Kecurangan kartu kredit

  • Cepat berubah
Pengantar Deteksi Anomali di R

Ayo berlatih!

Pengantar Deteksi Anomali di R

Preparing Video For Download...