Pohon isolasi

Pengantar Deteksi Anomali di R

Alastair Rushworth

Data Scientist

Pohon isolasi

Pengantar Deteksi Anomali di R

Plot pohon isolasi

Pengantar Deteksi Anomali di R

Melatih pohon isolasi

library(isofor)

furniture_tree <- iForest(data = furniture, nt = 1)

Argumen iForest()

  • data - dataframe
  • nt - jumlah pohon isolasi yang akan ditumbuhkan

 

 

Unduh paket dari https://github.com/Zelazny7/isofor

Pengantar Deteksi Anomali di R

Menghasilkan skor isolasi

furniture_score <- predict(furniture_tree, newdata = furniture)

Argumen predict()

  • object - model iForest terpasang
  • newdata - data untuk diskor
Pengantar Deteksi Anomali di R

Menafsirkan skor isolasi

furniture_score[1:10]
[1] 0.5820092 0.5820092 0.5439338 0.5820092 0.5439338 
[6] 0.5820092 0.7129862 0.5363547 0.5363547 0.5363547

Panjang lintasan terstandardisasi

  • Skor antara 0–1
  • Skor mendekati 1 menandakan anomali (lintasan pendek)
Pengantar Deteksi Anomali di R

Ayo berlatih!

Pengantar Deteksi Anomali di R

Preparing Video For Download...