# Likelihood

``` python
Likelihood()
```

What the front door needs from a likelihood.

`f` is the model output `[N, ...]`, the batch axis first. Axes after the batch axis that are not event axes are positions (tokens, pixels).

## Methods

| Name | Description |
|----|----|
| [event_axes](#hessiankit.Likelihood.event_axes) | The non-negative axes of `f` that form one event, the factors’ columns. |
| [factors](#hessiankit.Likelihood.factors) | Output factors of the negative log-likelihood, zero at void positions. |
| [fishers](#hessiankit.Likelihood.fishers) | The kinds `factors` can give. |
| [output_mask](#hessiankit.Likelihood.output_mask) | Boolean, one axis per axis of `f`, size 1 on event axes; `None` masks nothing. |

### event_axes

``` python
Likelihood.event_axes(f, /)
```

The non-negative axes of `f` that form one event, the factors’ columns.

### factors

``` python
Likelihood.factors(
    f,
    targets,
    /,
    *,
    fisher,
    mc_samples=1,
    generator=None,
    grouping='full',
)
```

Output factors of the negative log-likelihood, zero at void positions.

### fishers

``` python
Likelihood.fishers()
```

The kinds `factors` can give.

### output_mask

``` python
Likelihood.output_mask(f, targets, /)
```

Boolean, one axis per axis of `f`, size 1 on event axes; `None` masks nothing.
