Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.01 KB

README.md

File metadata and controls

45 lines (32 loc) · 1.01 KB

HalfSpaceTrees

half space trees for anomaly detection

Installation | Examples | API

This package implements half space trees for anomaly detection. Half space trees are an online variant of isolation forests. They work well when anomalies are spread out. However, they do not work well if anomalies are packed together in windows. The main feature of this package are:

  • Learn and score single features.

  • Support features with missing values.

For more information see original paper here.

Installation

pkg> add HalfSpaceTrees

Examples

using HalfSpaceTree
x = [Dict("x" => e, "y" => e, "z" => e) for e in [0.5, 0.45, 0.43, 0.44, 0.445, 0.45, 0.0]]
hst = HalfSpaceTree(ntrees=10, height=3, windowsize=3)
for e in x[1:3]
    learn!(hst, e)
end
score(hst, x[end - 1])

API

HalfSpaceTree
learn!
score