kumulant

RegressionStatGroup

StatGroup variant over regression inputs, so a schema's regression entries have a home.

Without it the declarator was reachable but unusable: every other group filters the schema by modality with mapNotNull, so a regression entry was silently skipped and the failure surfaced only as a missing key at read time.

Every entry must expect the same feature width, since one update fans out to all of them.

Constructors

RegressionStatGroup

constructor(stats: List<BoundStat<*, out RegressionStat<*>, *>>, concurrency: Concurrency? = null)(source)
constructor(vararg stats: BoundStat<*, out RegressionStat<*>, *>, concurrency: Concurrency? = null)(source)
constructor(vararg stats: Pair<StatKey<*>, RegressionStat<*>>, concurrency: Concurrency? = null)(source)
constructor(schema: StatSchema, concurrency: Concurrency = Concurrency.None)(source)

Properties

featureSize

open override val featureSize: Int(source)

Number of features expected in x on each update. Mismatched lengths throw.

Link copied to clipboard
override val concurrency: Concurrency

The weakest child guarantee; the requested mode applies when constructing fresh children.

Functions

create

open override fun create(concurrency: Concurrency? = null): RegressionStat<GroupResult>(source)

Create an independent accumulator at the configured baseline. A null concurrency preserves this accumulator's mode; a non-null value overrides it. Modality subtypes narrow the return type to preserve the input shape.

Link copied to clipboard
override fun merge(values: GroupResult, timestampNanos: Long = currentTimeNanos())

Fold a compatible snapshot values into this accumulator at timestampNanos. Implementations document whether the combine is exact or approximate and which state the snapshot omits. The source accumulator is unaffected.

Link copied to clipboard
override fun read(timestampNanos: Long = currentTimeNanos()): GroupResult

Return the current result evaluated at timestampNanos. Time-independent statistics ignore the timestamp. Reading does not add an observation.

Link copied to clipboard
override fun reset()

Restore the configured baseline, including any prior seed. Preserves the configuration and concurrency.

Link copied to clipboard
open fun update(x: Vector, y: Double, weight: Double = 1.0)

Record the pair (x, y) with weight at the current monotonic time.

open fun update(x: DoubleArray, y: Double, weight: Double = 1.0)

Convenience overload that wraps x as a DenseVector.

open fun update(x: DoubleArray, y: Double, timestampNanos: Long, weight: Double = 1.0)

Timestamped convenience overload that wraps x as a DenseVector.

open override fun update(x: Vector, y: Double, timestampNanos: Long, weight: Double = 1.0)

Record the pair (x, y) with weight at timestampNanos.

Link copied to clipboard
override fun validateMerge(values: GroupResult)

Validate values for merge without changing accumulator state. Containers validate every child before merging any of them. Successful validation checks compatibility; it does not make a concurrent merge transactional.

update

open override fun update(x: Vector, y: Double, timestampNanos: Long, weight: Double = 1.0)(source)

Record the pair (x, y) with weight at timestampNanos.