# shrinkage.ProximalFit

Shrinkage for Python · 0.2.0

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

<a id="constructor"></a>

```python
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.

<a id="solver"></a>

## `solver`

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

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

Explicitly selected numerical method.

<a id="family"></a>

## `family`

```python
family(self) -> Family
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

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

<a id="coefficients"></a>

## `coefficients`

```python
coefficients(self) -> FloatArray
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

Original-scale coefficients, shape `(n_features,)`.

<a id="intercept"></a>

## `intercept`

```python
intercept(self) -> float
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

Original-scale intercept, including the centering correction.

<a id="preprocessing"></a>

## `preprocessing`

```python
preprocessing(self) -> shrinkage.Preprocessing
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

Training transformations; prediction never estimates new ones.

<a id="termination"></a>

## `termination`

```python
termination(self) -> shrinkage.Termination
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

Whether the full mapping passed or an iteration budget expired.

<a id="iterations"></a>

## `iterations`

```python
iterations(self) -> int
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

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

<a id="objective"></a>

## `objective`

```python
objective(self) -> float
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

Original averaged loss plus the complete optimization-scale penalty.

<a id="stopping"></a>

## `stopping`

```python
stopping(self) -> shrinkage.StoppingCriterion
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

Resolved full-space proximal-gradient mapping criterion.

<a id="stopping_value"></a>

## `stopping_value`

```python
stopping_value(self) -> float
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

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

<a id="stopping_threshold"></a>

## `stopping_threshold`

```python
stopping_threshold(self) -> float
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

Absolute mapping tolerance used to certify convergence.

<a id="step_size"></a>

## `step_size`

```python
step_size(self) -> float
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

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

<a id="dual_certificate"></a>

## `dual_certificate`

```python
dual_certificate(self) -> FloatArray | None
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

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

<a id="dual_objective"></a>

## `dual_objective`

```python
dual_objective(self) -> float | None
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

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

<a id="duality_gap"></a>

## `duality_gap`

```python
duality_gap(self) -> float | None
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

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

<a id="screening_diagnostics"></a>

## `screening_diagnostics`

```python
screening_diagnostics(self) -> shrinkage.ScreeningDiagnostics
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

Certified restrictions and work in the original feature space.

<a id="predict"></a>

## `predict`

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

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/packages/python/src/shrinkage/fit.py>)

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.
