kumulant

HasSlope

Univariate special case of HasLinearModel: y = slope * x + intercept. The general weights vector and bias surface are derived from slope / intercept, so univariate regression results compose with any consumer written against HasLinearModel without storing redundant fields.

Implemented by com.eignex.kumulant.stat.regression.glm.UnivariateRegressionResult.

Inheritors

Properties

Link copied to clipboard
open override val bias: Double

Fitted bias / intercept term.

Link copied to clipboard
open override val featureSize: Int

Number of features in weights.

Link copied to clipboard
abstract val intercept: Double

Fitted intercept c.

Link copied to clipboard
abstract val slope: Double

Fitted slope coefficient m.

Link copied to clipboard
open override val weights: VectorView

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

Functions

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

Evaluate the linear predictor at x: bias + Sum_i weights[i] * x[i]. For Gaussian regression this is the prediction; for non-identity GLMs this is the linear predictor pre-link.

open fun predict(x: Double): Double

Evaluate the fitted line at x: slope * x + intercept.

bias

open override val bias: Double(source)

Fitted bias / intercept term.

featureSize

open override val featureSize: Int(source)

Number of features in weights.

intercept

abstract val intercept: Double(source)

Fitted intercept c.

predict

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

Evaluate the fitted line at x: slope * x + intercept.

slope

abstract val slope: Double(source)

Fitted slope coefficient m.

weights

open override val weights: VectorView(source)

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