EIF

class frlearn.data_descriptors.EIF(psi: int | Callable[[int], int] = 256, t: int = 100, random_state: int = 0, preprocessors=(), **eif_params)[source]

Wrapper for the Extended Isolation Forest (IF) data descriptor [1]. Requires the eif library, which is not automatically installed. Expresses the effort required to isolate a query instance from the target data by separating instances with random hyperplanes.

Parameters
psiint or (int -> int) = 256

Sub-sampling size. Number of training instances to use for each random tree. Should be either a positive integer, or a function that takes the size of the target class and returns such an integer. If the size of the target class is a smaller number, that will be used instead.

tint = 100

Number of random trees.

random_stateint = 0

Random state to use.

eif_params

additional keyword parameters will be passed on as-is to eif’s iForest constructor.

preprocessorsiterable = ()

Preprocessors to apply.

Notes

Scores are the complement of the anomaly scores in [1]. psi and t are two hyperparameters that can potentially be tuned, but the default values should be good enough [2].

References

1(1,2)

Hariri S, Carrasco Kind M, Brunner RJ (2021). Extended Isolation Forest. IEEE Transactions on Knowledge and Data Engineering, vol 33, no 4, pp 1479–1489. doi: 10.1109/TKDE.2019.2947676

2

Liu FT, Ting KM, Zhou Z-H (2008). Isolation Forest. ICDM 2008: Proceedings of the Eighth IEEE International Conference on Data Mining, pp 413–422. IEEE. doi: 10.1109/ICDM.2008.17

class Model[source]
property query