EIF#

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

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

class Model#