# shrinkage.Binomial

Shrinkage for Python · 0.2.0

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

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

```python
Binomial(y: object, *, fit_intercept: bool = True)
```

Average Bernoulli negative log likelihood with a logit link.

`y` follows the same dense response contract as [`Gaussian`](<94434efbf36463ad4214ed119d21c31637e86e3298c67d578a05f6b35edc59a9>) and must lie in `[0, 1]`. Fractional responses represent proportions with equal observation weights. The intercept is unpenalized. Fitted predictions are logits, including when fitting with hybrid IRLS.

<a id="y"></a>

## `y`

```python
y: object = field(repr=False)
```

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

<a id="fit_intercept"></a>

## `fit_intercept`

```python
fit_intercept: bool = field(default=True, kw_only=True)
```

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