Shrinkage

shrinkage.ProximalFit

Shrinkage for Python · python · 0.2.0

ProximalFit(_native: shrinkage._shrinkage._ModelFit)

Owned original-scale parameters and full original-loss diagnostics.

Inspect termination before treating the result as converged. Arrays are independent snapshots, and the result retains no training data. The objective, mapping, and dual diagnostics use optimization-scale penalties.

solver

solver(self) -> typing.Literal["hybrid", "proximal_gradient"]

Explicitly selected numerical method.

family

family(self) -> Family

"gaussian" or "binomial"; binomial predictions are logits.

coefficients

coefficients(self) -> FloatArray

Original-scale coefficients, shape (n_features,).

intercept

intercept(self) -> float

Original-scale intercept, including the centering correction.

preprocessing

preprocessing(self) -> shrinkage.Preprocessing

Training transformations; prediction never estimates new ones.

termination

termination(self) -> shrinkage.Termination

Whether the full mapping passed or an iteration budget expired.

iterations

iterations(self) -> int

Accepted PG updates, or hybrid PG transitions plus block sweeps.

objective

objective(self) -> float

Original averaged loss plus the complete optimization-scale penalty.

stopping

stopping(self) -> shrinkage.StoppingCriterion

Resolved full-space proximal-gradient mapping criterion.

stopping_value

stopping_value(self) -> float

Full mapping infinity norm, including the free-intercept derivative.

stopping_threshold

stopping_threshold(self) -> float

Absolute mapping tolerance used to certify convergence.

step_size

step_size(self) -> float

Step used to evaluate the final full original-loss mapping.

dual_certificate

dual_certificate(self) -> FloatArray | None

Feasible original-loss dual vector, shape (n_samples,), if available.

dual_objective

dual_objective(self) -> float | None

Original-problem dual lower bound, or None without screening.

duality_gap

duality_gap(self) -> float | None

Padded original-problem gap; the full mapping controls convergence.

screening_diagnostics

screening_diagnostics(self) -> shrinkage.ScreeningDiagnostics

Certified restrictions and work in the original feature space.

predict

predict(x: object, *, copy: bool = True) -> FloatArray

Predict means or logits, returning float64 shape (n_samples,).

Binomial predictions are logits, not probabilities or class labels. Input rules match fitting, except zero rows are allowed. Inputs are copied before releasing the GIL and must remain unchanged until return. Prediction uses original-scale coefficients without refitting any preprocessing. copy=False is unsupported.