R 异常检测入门
Alastair Rushworth
Data Scientist


library(isofor)furniture_tree <- iForest(data = furniture, nt = 1)
iForest() 参数
data - 数据框nt - 要生长的隔离树数量
furniture_score <- predict(furniture_tree, newdata = furniture)
predict() 参数
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 异常检测入门