HasLinearModel
Result trait for accumulators that produce a fitted linear model y = bias + weights . x. Covers both the univariate special case (HasSlope; slope + intercept) and the multivariate case (com.eignex.kumulant.stat.regression.glm.LinearRegressionResult; weights vector + scalar bias) behind one surface.
Consumers written against HasLinearModel handle any linear model uniformly: contextual bandits use it for scoring, downstream pipelines use it for prediction, evaluation metrics use it for residuals.
The predict method evaluates bias + Sum_i weights[i] * x[i]. For generalised linear models with a non-identity link the linear predictor eta (this method) and the response mean mu = link.invMean(eta) are distinct; the linear-model-specific result types expose both.
Inheritors
Properties
Number of features in weights.
Fitted weight per feature, indexed by the same i as the input x[i].
Functions
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.
bias
featureSize
Number of features in weights.
predict
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.
weights
Fitted weight per feature, indexed by the same i as the input x[i].