kumulant

LinearCounting

@Serializable
@SerialName(value = "LinearCounting")
data class LinearCounting(val bits: Int = 4096, val hasher: HasherRef = HasherRef.SplitMix64) : DiscreteStatSpec<LinearCountingResult> (source)

Spec for LinearCountingStat: cardinality estimator backed by a bitset of bits cells.

Constructors

Link copied to clipboard
constructor(bits: Int = 4096, hasher: HasherRef = HasherRef.SplitMix64)

Properties

Link copied to clipboard
val bits: Int

Bitset size; trade-off between memory and accuracy near the saturation cap.

Link copied to clipboard

HasherRef for the mixer applied before indexing; resolved via the Hashers registry.

Functions

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
fun <R : Result> DiscreteStatSpec<R>.materialize(concurrency: Concurrency = Concurrency.None): DiscreteStat<R>
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

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

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

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

Link copied to clipboard

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

Link copied to clipboard

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

LinearCounting

constructor(bits: Int = 4096, hasher: HasherRef = HasherRef.SplitMix64)(source)

bits

Bitset size; trade-off between memory and accuracy near the saturation cap.

hasher

HasherRef for the mixer applied before indexing; resolved via the Hashers registry.