Modelkit.Linear_regressionWeighted ordinary least squares using column-pivoted Householder QR.
The solver never forms normal equations. It reports numerical rank and returns a deterministic basic least-squares solution for rank-deficient inputs. The optional intercept is fitted without regularization. Fit costs O(samples * features squared) and prediction costs O(samples * features).
val create : ?fit_intercept:bool -> unit -> tval intercept : fitted -> floatval report : fitted -> Solver_report.tinclude REGRESSOR
with type t := t
and type params := params
and type fitted := fitted
and type rng = Rng.tinclude ESTIMATOR
with type target = Target.regression Target.t
and type prediction = Target.regression Target.t
with type t := t
with type params := params
with type fitted := fitted
with type rng = Rng.ttype target = Target.regression Target.ttype prediction = Target.regression Target.ttype rng = Rng.tval fit :
t ->
?sample_weight:Sample_weight.t ->
rng:rng ->
feature_schema:Feature_schema.t ->
x:Matrix.t ->
y:target ->
unit ->
(fitted, Error.t) resultval predict :
fitted ->
feature_schema:Feature_schema.t ->
x:Matrix.t ->
(prediction, Error.t) resultval feature_schema : fitted -> Feature_schema.t