R 中的異常偵測入門
Alastair Rushworth
Data Scientist


library(isofor)furniture_tree <- iForest(data = furniture, nt = 1)
iForest() arguments
data - dataframent - 要生成的 isolation trees 數量
furniture_score <- predict(furniture_tree, newdata = furniture)
predict() arguments
object - 已配適的 iForest 模型newdata - 要評分的資料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
標準化路徑長度
R 中的異常偵測入門