kumulant

LinearRegressionResult

Common shape across multivariate-x linear regression snapshots.

Concrete subtypes add uncertainty quantification:

Sealed + @Serializable. Concrete weights round-trip as DenseVector today; the public field is typed VectorView so a sparse variant can swap in without breaking callers. Regression error metrics from HasRegression become meaningful once sse is tracked; implementations that don't accumulate it return 0.0.

Inheritors

Properties

Link copied to clipboard
abstract override val bias: Double

Fitted bias / intercept term.

Link copied to clipboard
open val featureSize: Int

Number of features in weights.

Link copied to clipboard
abstract val link: Link

Canonical link applied at prediction time; the stored weights and bias live in the linear-predictor space, predict returns the link-mapped mean.

Link copied to clipboard
open val mse: Double

Mean squared error: sse / totalWeights. Zero on an empty stream.

Link copied to clipboard
open val rmse: Double

Root mean squared error: sqrt([mse]).

Link copied to clipboard
open val rSquared: Double

Coefficient of determination 1 - sse/sst. Zero when sst is zero.

Link copied to clipboard

Unbiased sample standard deviation: sqrt([sampleVariance]).

Link copied to clipboard

Unbiased sample variance: [sst] / ([totalWeights] - 1). Zero when totalWeights <= 1.

Link copied to clipboard
abstract val sse: Double

Sum of squared errors (residuals). Under non-identity GLMs this is the deviance.

Link copied to clipboard
open val ssr: Double

Sum of squares due to regression: sst - sse.

Link copied to clipboard
open val sst: Double

Sum of squared deviations from the running mean: Sum (x - mean)^2 * weight.

Link copied to clipboard
open val stdDev: Double

Population standard deviation: sqrt([variance]).

Link copied to clipboard
abstract val step: Long

Number of com.eignex.kumulant.core.RegressionStat.update calls absorbed; useful as a bookkeeping counter for learning-rate decay or retraining cadence.

Link copied to clipboard
abstract override val totalWeights: Double

Cumulative observation weight folded in.

Link copied to clipboard
open val variance: Double

Population variance: [sst] / [totalWeights]. Zero on an empty stream.

Link copied to clipboard
abstract override val weights: VectorView

Fitted weight per feature, indexed by the same i as the input x[i].

Functions

Link copied to clipboard

Linear predictor eta = bias + x . weights, before the inverse link.

Link copied to clipboard
open override fun predict(x: VectorView): Double

Mean response: link.invMean(linearPredictor(x)). For Link.Identity this is the linear predictor itself, matching plain linear regression.

bias

abstract override val bias: Double(source)

Fitted bias / intercept term.

linearPredictor

Linear predictor eta = bias + x . weights, before the inverse link.

predict

open override fun predict(x: VectorView): Double(source)

Mean response: link.invMean(linearPredictor(x)). For Link.Identity this is the linear predictor itself, matching plain linear regression.

step

abstract val step: Long(source)

Number of com.eignex.kumulant.core.RegressionStat.update calls absorbed; useful as a bookkeeping counter for learning-rate decay or retraining cadence.

totalWeights

abstract override val totalWeights: Double(source)

Cumulative observation weight folded in.

weights

abstract override val weights: VectorView(source)

Fitted weight per feature, indexed by the same i as the input x[i].