# shrinkage.WorkingSetPolicy

Shrinkage for Python · 0.2.0

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

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

```python
WorkingSetPolicy(
    kind: typing.Literal["auto", "disabled", "ever_active", "adaptive"],
    initial_size: int = 10,
    prune: bool = True
)
```

Heuristic feature selection, independent of certified zero screening.

Every policy retains current nonzeros. Excluded zeros may reenter after full checks. Only the original full-space mapping certifies convergence.

<a id="kind"></a>

## `kind`

```python
kind: typing.Literal["auto", "disabled", "ever_active", "adaptive"]
```

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

<a id="initial_size"></a>

## `initial_size`

```python
initial_size: int = 10
```

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

<a id="prune"></a>

## `prune`

```python
prune: bool = True
```

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

<a id="auto"></a>

## `auto`

```python
auto() -> shrinkage.WorkingSetPolicy
```

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

Use adaptive sets for single fits, or ever-active sets for paths.

<a id="disabled"></a>

## `disabled`

```python
disabled() -> shrinkage.WorkingSetPolicy
```

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

Update every feature allowed by independently configured screening.

<a id="ever_active"></a>

## `ever_active`

```python
ever_active() -> shrinkage.WorkingSetPolicy
```

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

Retain features activated at accepted iterates.

<a id="adaptive"></a>

## `adaptive`

```python
adaptive(
    initial_size: int = 10,
    *,
    prune: bool = True
) -> shrinkage.WorkingSetPolicy
```

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

Rank violations, growing the set and optionally pruning it.
