kumulant

CovarianceRegressionResult

@Serializable
@SerialName(value = "CovarianceRegressionResult")
data class CovarianceRegressionResult(val weights: DenseVector, val bias: Double, val biasPrecision: Double, val totalWeights: Double, val step: Long, val covariance: DenseMatrix, val covarianceL: DenseMatrix, val link: Link = Link.Identity, val sse: Double = 0.0) : LinearRegressionResult(source)

Full multivariate-Gaussian posterior. Carries the joint covariance and its lower-triangular Cholesky factor L so samplers can draw w ~ N(mean, cov) as mean + L u, u ~ N(0, I) without redoing the decomposition.

Constructors

Link copied to clipboard
constructor(weights: DenseVector, bias: Double, biasPrecision: Double, totalWeights: Double, step: Long, covariance: DenseMatrix, covarianceL: DenseMatrix, link: Link = Link.Identity, sse: Double = 0.0)

Properties

Link copied to clipboard
open override val bias: Double

Fitted bias / intercept term.

Link copied to clipboard

Posterior precision (inverse variance) on the bias term.

Link copied to clipboard

Full posterior covariance matrix over weights.

Link copied to clipboard

Lower-triangular Cholesky factor of covariance, maintained in lockstep for sampling.

Link copied to clipboard
open val featureSize: Int

Number of features in weights.

Link copied to clipboard
open override 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
open override 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
open override 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
open 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
open override val weights: DenseVector

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.

CovarianceRegressionResult

constructor(weights: DenseVector, bias: Double, biasPrecision: Double, totalWeights: Double, step: Long, covariance: DenseMatrix, covarianceL: DenseMatrix, link: Link = Link.Identity, sse: Double = 0.0)(source)

biasPrecision

Posterior precision (inverse variance) on the bias term.

bias

open override val bias: Double(source)

Fitted bias / intercept term.

covarianceL

Lower-triangular Cholesky factor of covariance, maintained in lockstep for sampling.

covariance

Full posterior covariance matrix over weights.

sse

open override val sse: Double(source)

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

step

open override 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

open override val totalWeights: Double(source)

Cumulative observation weight folded in.

weights

open override val weights: DenseVector(source)

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