kumulant

HalfSpaceTrees

@Serializable
@SerialName(value = "HalfSpaceTrees")
data class HalfSpaceTrees(val featureSize: Int, val featureRanges: List<FeatureRange>, val numTrees: Int = 25, val height: Int = 8, val windowSize: Int = 250, val randomSeed: Int = 0) : VectorStatSpec<HalfSpaceTreesResult> (source)

Spec for HalfSpaceTreesStat: online ensemble of random half-space trees for multivariate anomaly scoring.

Constructors

Link copied to clipboard
constructor(featureSize: Int, featureRanges: List<FeatureRange>, numTrees: Int = 25, height: Int = 8, windowSize: Int = 250, randomSeed: Int = 0)

Properties

Link copied to clipboard

Per-feature value ranges used to draw random split thresholds.

Link copied to clipboard

Number of input features.

Link copied to clipboard
val height: Int

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

Link copied to clipboard

Number of trees in the ensemble.

Link copied to clipboard

PRNG seed shared across trees.

Link copied to clipboard

Observations per window before the reference profile rotates.

Functions

Link copied to clipboard

Wrap this vector spec so updates are forwarded only when pred evaluates true on the full vector.

Link copied to clipboard
fun StatSpec.materialize(concurrency: Concurrency = Concurrency.None): Stat<*>

Construct a live stat from any StatSpec, dispatching on its modality. Useful for code paths (like StatSchemaDef.materialize) that iterate over an erased Map<String, StatSpec> and don't statically know the modality.

fun <R : Result> VectorStatSpec<R>.materialize(concurrency: Concurrency = Concurrency.None): VectorStat<R>
Link copied to clipboard
fun <R : Result> VectorStatSpec<R>.minMaxScaleFeatures(dimensions: Int, targetLow: Double = 0.0, targetHigh: Double = 1.0): VectorStatSpec<R>

Element-wise min-max scale a vector spec against a hidden per-coordinate Range primary.

Link copied to clipboard

Wrap this vector spec to keep each update with probability rate; seed feeds the PRNG.

Link copied to clipboard

Element-wise standardise a vector spec against a hidden per-coordinate Variance primary.

Link copied to clipboard

Wrap this vector spec so it only sees one in every every updates.

Link copied to clipboard

Wrap this vector spec to apply expr to every element of each incoming vector before update.

Link copied to clipboard

Wrap this vector spec so each incoming vector is remapped through expr before update.

Link copied to clipboard

Wrap this vector spec so every update's weight is multiplied by expr.eval(0, 0, vec).

Link copied to clipboard
fun <R : Result> VectorStatSpec<R>.windowed(durationMillis: Long, slices: Int = 10): VectorStatSpec<R>

Wrap this vector spec in a sliding time window of durationMillis split into slices buckets.

Link copied to clipboard

Wrap this vector spec so every update applies the per-observation weight multiplier.

HalfSpaceTrees

constructor(featureSize: Int, featureRanges: List<FeatureRange>, numTrees: Int = 25, height: Int = 8, windowSize: Int = 250, randomSeed: Int = 0)(source)

featureRanges

Per-feature value ranges used to draw random split thresholds.

featureSize

Number of input features.

height

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

numTrees

Number of trees in the ensemble.

randomSeed

PRNG seed shared across trees.

windowSize

Observations per window before the reference profile rotates.