# Updating priors

by: Meera Machado

(Feyn version 3.0 or newer)

The `QLattice`

is the tool that handles generating the `Models`

. By default, all input variables on a dataset have equal probability of being chosen to compose a `Model`

. Nevertheless, we can update the `QLattice`

with a different set of probabilities associated to each input variable. The result is straightforward: inputs with higher probability values will be chosen more often to compose a `Model`

.

Here we go through an example:

```
import feyn
priors = {"x1": 1., "x2": 0.99, "x3": 0.98, "x4": 0.97}
ql = feyn.QLattice()
ql.update_priors(priors)
```

## priors

A `Dict`

object where the `keys`

are the names of the input variables and the `values`

are the probabilities associated to each input.

## reset

A boolean that determines whether the probabilities of choosing each input variable should be reset (**True**) or not (**False**) when updating the `QLattice`

with **priors**.

**priors**

Calculating the Refer to Estimating priors to see how the **priors** can be calculated base on the mutual information between each input variable and the output.