# shrinkage.HybridFit

Shrinkage for Python · 0.2.0

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

Bases: `shrinkage.ProximalFit`

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

```python
HybridFit(_native: shrinkage._shrinkage._ModelFit)
```

A hybrid result with optimization-scale clusters and inner/outer work.

Clustered lasso groups signed values in increasing order. Chain fused lasso groups contiguous segments in feature order, retaining cuts at zero weights. SLOPE groups decreasing nonnegative magnitudes and retains each feature's sign. Training scales can change equalities among the reported original-scale coefficients.

<a id="cluster_labels"></a>

## `cluster_labels`

```python
cluster_labels(self) -> numpy.typing.NDArray[numpy.intp]
```

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

Zero-based indices into `cluster_values`, shape `(n_features,)`.

<a id="cluster_values"></a>

## `cluster_values`

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

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

Optimization-scale block values, shape `(n_clusters,)`.

<a id="coefficient_signs"></a>

## `coefficient_signs`

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

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

Optimization-scale feature signs (-1, 0, or 1), shape `(n_features,)`.

<a id="pg_steps"></a>

## `pg_steps`

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

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

Committed PG transitions, excluding diagnostic proximal calls.

<a id="coordinate_sweeps"></a>

## `coordinate_sweeps`

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

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

Complete block-coordinate sweeps over the current working set.

<a id="diagnostic_checks"></a>

## `diagnostic_checks`

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

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

Refreshed inner checks, including quadratic checks in logistic fits.

<a id="backtracks"></a>

## `backtracks`

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

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

Rejected PG trials followed by curvature doubling.

<a id="outer_iterations"></a>

## `outer_iterations`

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

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

Accepted logistic IRLS steps; zero for Gaussian fits.

<a id="outer_backtracks"></a>

## `outer_backtracks`

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

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

Rejected logistic trials followed by step halving; zero for Gaussian.

<a id="step_policy"></a>

## `step_policy`

```python
step_policy(self) -> shrinkage.HybridStep
```

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

Configured Gaussian or logistic quadratic curvature policy.

<a id="working_set_diagnostics"></a>

## `working_set_diagnostics`

```python
working_set_diagnostics(self) -> shrinkage.WorkingSetDiagnostics
```

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

Effective working-set policy and feature and block work counters.

- [`solver`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#solver>) (inherited)

- [`family`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#family>) (inherited)

- [`coefficients`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#coefficients>) (inherited)

- [`intercept`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#intercept>) (inherited)

- [`preprocessing`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#preprocessing>) (inherited)

- [`termination`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#termination>) (inherited)

- [`iterations`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#iterations>) (inherited)

- [`objective`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#objective>) (inherited)

- [`stopping`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#stopping>) (inherited)

- [`stopping_value`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#stopping_value>) (inherited)

- [`stopping_threshold`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#stopping_threshold>) (inherited)

- [`step_size`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#step_size>) (inherited)

- [`dual_certificate`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#dual_certificate>) (inherited)

- [`dual_objective`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#dual_objective>) (inherited)

- [`duality_gap`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#duality_gap>) (inherited)

- [`screening_diagnostics`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#screening_diagnostics>) (inherited)

- [`predict`](<2c008b7eab0323c187ae571d9e827f32e6ae46e0f58394ae9c6fa2a0a4447168#predict>) (inherited)
