# shrinkage.Preprocessing

Shrinkage for Python · 0.2.0

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

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

```python
Preprocessing(
    centering: str,
    scaling: str,
    centers: FloatArray | None,
    scales: FloatArray | None
)
```

Training-column normalization resolved during fitting.

`centers` and `scales` have shape `(n_features,)` when enabled and are `None` otherwise. Zero computed scales become one. Arrays are independent snapshots; changing them cannot change a fitted model.

<a id="centering"></a>

## `centering`

```python
centering: str
```

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

<a id="scaling"></a>

## `scaling`

```python
scaling: str
```

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

<a id="centers"></a>

## `centers`

```python
centers: FloatArray | None
```

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

<a id="scales"></a>

## `scales`

```python
scales: FloatArray | None
```

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