kumulant

VectorStatSpec

@Serializable
sealed interface VectorStatSpec<R : Result> : StatSpec(source)

StatSpec that materializes into a com.eignex.kumulant.core.VectorStat with result type R.

Inheritors

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.