Documentation
¶
Overview ¶
Package go_iforest is an implementation of isolation forests as defined in https://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/icdm08b.pdf.
Index ¶
Constants ¶
View Source
const EulersConstant = 0.5772156649
Variables ¶
View Source
var ( ErrTooLargeSubSamplingSize = errors.New("specified sub-sampling size is larger than amount of provided samples") ErrNoSamplesProvided = errors.New("no samples provided") )
Functions ¶
Types ¶
type IForest ¶
func NewIForest ¶
NewIForest creates a new IForest and trains it on the provided data X make sure to call rand.Seed() before calling this function to ensure that a sufficiently random sub-sample is chosen.
func (*IForest) CalculateAnomalyScore ¶
CalculateAnomalyScore calculates an anomaly score based for a sample x
Click to show internal directories.
Click to hide internal directories.