Isolation trees

Introductie tot anomaliedetectie in R

Alastair Rushworth

Data Scientist

Isolation tree

Introductie tot anomaliedetectie in R

Isolation tree-plots

Introductie tot anomaliedetectie in R

Een isolation tree fitten

library(isofor)

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

iForest()-argumenten

  • data - dataframe
  • nt - aantal te groeien isolation trees

 

 

Pakket downloaden via https://github.com/Zelazny7/isofor

Introductie tot anomaliedetectie in R

Een isolation score genereren

furniture_score <- predict(furniture_tree, newdata = furniture)

predict()-argumenten

  • object - een getraind iForest-model
  • newdata - data om te scoren
Introductie tot anomaliedetectie in R

De isolation score interpreteren

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

Gestandaardiseerde padlengte

  • Scores tussen 0 en 1
  • Dicht bij 1 duidt op anomalieën (korte padlengte)
Introductie tot anomaliedetectie in R

Laten we oefenen!

Introductie tot anomaliedetectie in R

Preparing Video For Download...