6
$\begingroup$

Is there a R implementation of isolation forest for anomaly detection?

Similar to the implementation from sklearn.

$\endgroup$
8
$\begingroup$

See the iforest package on Sourceforge or on R-Forge:

This package implements an anomaly detection method that detects data-anomalies using binary trees. Using the property that anomalies are more susceptible to isolation, anomalies can be detected as data points which have short expected path lengths.

Isolation Forest detects data-anomalies using binary trees. Platform: R Reference: Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou, “Isolation Forest”, IEEE International Conference on Data Mining 2008 (ICDM 08)

or the isofor package on GitHub:

One efficient way of performing outlier detection in high-dimensional datasets is to use random forests. The isofor ‘isolates’ observations by randomly selecting a feature and then randomly selecting a split value between the maximum and minimum values of the selected feature.

$\endgroup$
  • $\begingroup$ Interesting! since both packages are not in CRAN, is there an easy "for dummies" way to install them, at least on a Linux (not OSX) VM ? $\endgroup$ – guzu92 Sep 1 '17 at 14:51
  • 3
    $\begingroup$ install devtools (install.packages("devtools")) and then devtools::install_github("Zelazny7/isofor") $\endgroup$ – rcs Sep 1 '17 at 20:39
3
$\begingroup$

Solitude (CRAN / github): Isolation forest is anomaly detection method introduced by the paper Isolation based Anomaly Detection (Liu, Ting and Zhou )

PS: I am the author of this package

$\endgroup$
  • $\begingroup$ I think you forgot to export most methods, only isolation_forest is visible $\endgroup$ – Cos Dec 17 '18 at 13:46
  • 1
    $\begingroup$ @Cos predict method exists. This vignette should help. bit.ly/2Qwbs8L $\endgroup$ – talegari Dec 18 '18 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.