Skip to content

Commit

Permalink
notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
LegrandNico committed Nov 7, 2023
1 parent dddbc32 commit 916870d
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 89 deletions.
145 changes: 87 additions & 58 deletions docs/source/notebooks/1.1-Binary_HGF.ipynb

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions docs/source/notebooks/1.1-Binary_HGF.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ three_levels_hgf = three_levels_hgf.input_data(input_data=u)
three_levels_hgf.plot_trajectories();
```

#### Surprise

```{code-cell} ipython3
three_levels_hgf.surprise()
```

## Learning parameters with MCMC sampling
In the previous section, we assumed we knew the parameters of the HGF models that were used to filter the input data. This can give us information on how an agent using these values would behave when presented with these inputs. We can also adopt a different perspective and consider that we want to learn these parameters from the data. Here, we are going to set some of the parameters free and use Hamiltonian Monte Carlo methods (NUTS) to sample their probability density.

Expand Down
62 changes: 31 additions & 31 deletions docs/source/notebooks/1.3-Continuous_HGF.ipynb

Large diffs are not rendered by default.

0 comments on commit 916870d

Please sign in to comment.