Class GeneralizedIsolationTree

Inheritance Relationships

Base Type

Class Documentation

class genif::GeneralizedIsolationTree : public genif::Learner<GIFModel, OutlierDetectionResult>

Public Functions

GeneralizedIsolationTree(unsigned int k, const GIFExitCondition &exitCondition, unsigned int workerCount, int seed = -1)

Constructs an instance of GeneralizedIsolationTree.

Parameters
  • k: The number of representatives to find for each node.

  • exitCondition: An exit condition, which controls, when tree induction is stopped.

  • workerCount: Number of workers to consider.

  • seed: Seed to use for random number generation (-1 defaults to sysclock seed). Pass an integer for constant result across multiple runs.

Learner<GIFModel, OutlierDetectionResult> &fit(const MatrixX &dataset) override

Fits the tree using a given dataset.

Return

A reference to this object.

Parameters
  • dataset: The dataset to use for fitting.

Tree *findTree(const MatrixX &dataset)

Finds a tree using a given dataset.

Return

A raw pointer to the induced tree.

Parameters
  • dataset: The dataset to create the tree from.

GIFModel getModel() const override

Returns a previously fitted model.

Return

As stated above.

OutlierDetectionResult predict(const MatrixX &dataset) const override

Predicts the outlierness for a given dataset using a previously fitted model.

Return

An instance of OutlierDetectionResult which contains the probabilities for individual observations to be inliers.

Parameters
  • dataset: The dataset to inspect for outliers.

OutlierDetectionResult predict(const MatrixX &dataset, const GIFModel &model) const override

Predicts the outlierness for a given dataset using a previously fitted model.

Return

An instance of OutlierDetectionResult which contains the probabilities for individual observations to be inliers.

Parameters
  • dataset: The dataset to inspect for outliers.

  • model: The model to use for prediction.

std::unique_ptr<Learner<GIFModel, OutlierDetectionResult>> copy() const override

Takes a copy of this object.

Return

An unique_ptr pointing to a copy of this instance.