kumulant

HalfSpaceTreesResult

@Serializable
@SerialName(value = "HalfSpaceTreesResult")
data class HalfSpaceTreesResult(val featureSize: Int, val numTrees: Int, val height: Int, val totalWeights: Double, val featureIndices: IntArray, val thresholds: DoubleArray, val referenceMass: DoubleArray) : Result(source)

Snapshot of HalfSpaceTreesStat: the immutable tree structure plus the reference-window per-leaf masses. Exposes score to evaluate a query vector against the trees' frozen distribution.

Constructors

HalfSpaceTreesResult

constructor(featureSize: Int, numTrees: Int, height: Int, totalWeights: Double, featureIndices: IntArray, thresholds: DoubleArray, referenceMass: DoubleArray)(source)

Properties

featureIndices

Flat numTrees * (2^height - 1) array of per-internal-node feature indices.

featureSize

Number of input features.

height

Depth of each tree; each tree has 2^height leaves.

numTrees

Number of trees in the ensemble.

referenceMass

Flat numTrees * 2^height array of per-leaf masses summed over the reference window.

thresholds

Flat numTrees * (2^height - 1) array of per-internal-node split thresholds.

totalWeights

Cumulative observation weight folded into the reference window.

Functions

equals

open operator override fun equals(other: Any?): Boolean(source)

hashCode

open override fun hashCode(): Int(source)

score

Half-Space-Trees anomaly score for x. Routes x through every tree to a leaf, sums referenceMass[leaf] * 2^depth across trees. Higher score means x falls into densely populated regions of the reference window; i.e. it looks normal. Lower score flags an anomaly.