Building isolation trees

Share:

Description

Building isolation trees

Usage

1
       IsolationTrees(x, ntree=10, hlim=as.integer(ceiling(log2(nrow(x)))), rowSamp=F, nRowSamp=nrow(x), nmin=1, rFactor=1, colSamp=F, nColSamp=ncol(x), colWeight=c(rep(1,ncol(x))))

Arguments

x

a data frame of training samples

ntree

number of tree to build

hlim

height limit

rowSamp

logical swith to perform random sub-sampling

nRowSamp

sub-sampling size; it must be less than or equal to the training sample size

nmin

minimum number of sample to form a leaf

rFactor

randomisation factor, range from 0 to 1, 0 for fully deterministic, 1 for fully random

colSamp

logical switch to perform random attribute-sampling

nColSamp

attribute-sampling size; it must be less than or equal to the number of attributes

colWeight

attribute weight that is being used in random attribute sub-sampling

Details

Building random binary trees

Value

a data structure that represent an Isolation Forest model

Author(s)

Fei Tony Liu

References

Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou
Isolation Forest
IEEE International Conference on Data Mining 2008 (ICDM 08), Pisa, Italy, 2008. http://www.gscit.monash.edu.au/gscitweb/loid.php?loid=905282&mimetype=application/pdf

See Also

AnomalyScore

Examples

1
2
3
4
5
6
7
8
library(IsolationForest)
data(stackloss)
# train a model of Isolation Forest
tr<-IsolationTrees(stackloss, rFactor=0)
#evaluate anomaly score
as<-AnomalyScore(stackloss,tr)
# show anomaly score
as$outF

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.