kumulant

GroupStatSpec

@Serializable
@SerialName(value = "GroupStatSpec")
data class GroupStatSpec(val stats: Map<String, StatSpec>) : SeriesStatSpec<GroupResult> (source)

Serializable spec for a nested series-modality StatGroup. Holds a recursive map of StatSpec entries keyed by name; every entry must itself be a SeriesStatSpec; materialization happens in StatFactory.kt.

Constructors

Link copied to clipboard
constructor(stats: Map<String, StatSpec>)

Properties

Link copied to clipboard

Nested specs keyed by StatKey.name; each must be a SeriesStatSpec.

Functions

Link copied to clipboard

Adapt a series spec into a discrete spec - the discrete sees value.toLong() per update.

Link copied to clipboard

Adapt a series spec into a vector spec by consuming the index-th coordinate of each vector.

Link copied to clipboard

Adapt a series spec into a paired spec by consuming the x component of each pair.

Link copied to clipboard

Adapt a series spec into a paired spec by consuming the y component of each pair.

Link copied to clipboard

Wrap this series spec to expose a [lower, upper] band of width k * scale around center.

Link copied to clipboard

Wrap this series spec to forward the per-second time derivative of the value stream.

Link copied to clipboard

Wrap this series spec to forward the k-th difference value - value[t - k].

Link copied to clipboard

Wrap this series spec so updates are forwarded only when pred evaluates true.

Link copied to clipboard

Lift this series spec to a paired spec, reducing every (x, y) to a scalar via expr.

Link copied to clipboard

Lift this series spec into the regression modality. project reduces each (x = V, y = Y) update to a scalar that the inner series stat absorbs. Use Y for the marginal-y view.

Link copied to clipboard

Lift this series spec to a vector spec, reducing every vector to a scalar via expr.

Link copied to clipboard

Wrap this series spec to debounce its input into a 0.0/1.0 stream via two-threshold hysteresis.

Link copied to clipboard

Wrap this series spec to forward the value seen k updates ago.

Link copied to clipboard
fun <R : Result> SeriesStatSpec<R>.materialize(concurrency: Concurrency = Concurrency.None): SeriesStat<R>

Construct a live SeriesStat from a SeriesStatSpec. One when per modality, one cast at the boundary - sealed-hierarchy exhaustiveness keeps the cast safe.

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.

Link copied to clipboard
fun <R : Result> SeriesStatSpec<R>.minMaxScaler(targetLow: Double = 0.0, targetHigh: Double = 1.0): SeriesStatSpec<R>

Min-max scale the input against a hidden Range primary into [targetLow, targetHigh], then forward the mapped value to this spec. Defaults map to [0, 1]; pass targetLow = -1.0, targetHigh = 1.0 for a [-1, 1] mapping. Emits targetLow while the running range is still degenerate.

Link copied to clipboard
fun <R : Result> SeriesStatSpec<R>.resampleByTime(bucketMillis: Long, aggregator: ResampleAggregator = ResampleAggregator.Mean): SeriesStatSpec<R>

Wrap this series spec to forward one per-bucket summary using aggregator.

Link copied to clipboard

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

Link copied to clipboard

Z-score the input against a hidden Variance primary, then forward the standardized value to this spec. Emits 0 while the running variance is still zero.

Link copied to clipboard

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

Link copied to clipboard

Wrap this series spec to apply expr to every update before the inner stat sees it.

Link copied to clipboard
fun <R : Result> SeriesStatSpec<R>.vectorized(dimensions: Int, skipZeros: Boolean = false): VectorStatSpec<ResultList<R>>

Lift a series spec to a vector spec by replicating it across every coordinate of an N-dim input.

Link copied to clipboard

Wrap this series spec so every update's weight is multiplied by expr.eval(value).

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

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

Link copied to clipboard

Wrap this inner series spec with a feedback primary; the projection AST sees the primary snapshot.

Link copied to clipboard

Wrap this series spec so every update pushes the constant value regardless of input.

Link copied to clipboard

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

GroupStatSpec

constructor(stats: Map<String, StatSpec>)(source)

stats

Nested specs keyed by StatKey.name; each must be a SeriesStatSpec.