Modelkit.Logistic_regressionWeighted binary logistic regression with an L2 coefficient penalty.
Exactly two positively weighted integer classes are supported and stored in ascending order. c is the positive inverse regularization strength. Stable sigmoid and softplus formulas avoid overflow. Deterministic damped Newton iterations stop on gradient or step tolerance; exhausting max_iterations is a typed convergence failure. Fit costs O(iterations * samples * features squared) and prediction costs O(samples * features).
val intercept : fitted -> floatval classes : fitted -> int arrayval report : fitted -> Solver_report.tinclude CLASSIFIER
with type t := t
and type params := params
and type fitted := fitted
and type rng = Rng.tinclude ESTIMATOR
with type target = Target.classification Target.t
and type prediction = Target.classification Target.t
with type t := t
with type params := params
with type fitted := fitted
with type rng = Rng.ttype target = Target.classification Target.ttype prediction = Target.classification 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