Skip to content

Commit cd2c212

Browse files
committed
Change order in readme and reference new book [skip ci]
1 parent 4781e2e commit cd2c212

File tree

1 file changed

+39
-35
lines changed

1 file changed

+39
-35
lines changed

README.md

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -49,39 +49,6 @@ neural networks for parameter estimation, model comparison, and model validation
4949
when working with intractable simulators whose behavior as a whole is too
5050
complex to be described analytically.
5151

52-
## Getting Started
53-
54-
Using the high-level interface is easy, as demonstrated by the minimal working example below:
55-
56-
```python
57-
import bayesflow as bf
58-
59-
workflow = bf.BasicWorkflow(
60-
inference_network=bf.networks.CouplingFlow(),
61-
summary_network=bf.networks.TimeSeriesNetwork(),
62-
inference_variables=["parameters"],
63-
summary_variables=["observables"],
64-
simulator=bf.simulators.SIR()
65-
)
66-
67-
history = workflow.fit_online(epochs=15, batch_size=32, num_batches_per_epoch=200)
68-
69-
diagnostics = workflow.plot_default_diagnostics(test_data=300)
70-
```
71-
72-
For an in-depth exposition, check out our walkthrough notebooks below.
73-
74-
1. [Linear regression starter example](examples/Linear_Regression_Starter.ipynb)
75-
2. [From ABC to BayesFlow](examples/From_ABC_to_BayesFlow.ipynb)
76-
3. [Two moons starter example](examples/Two_Moons_Starter.ipynb)
77-
4. [Rapid iteration with point estimators](examples/Lotka_Volterra_Point_Estimation_and_Expert_Stats.ipynb)
78-
5. [SIR model with custom summary network](examples/SIR_Posterior_Estimation.ipynb)
79-
6. [Bayesian experimental design](examples/Bayesian_Experimental_Design.ipynb)
80-
7. [Simple model comparison example](examples/One_Sample_TTest.ipynb)
81-
8. [Moving from BayesFlow v1.1 to v2.0](examples/From_BayesFlow_1.1_to_2.0.ipynb)
82-
83-
More tutorials are always welcome! Please consider making a pull request if you have a cool application that you want to contribute.
84-
8552
## Install
8653

8754
You can install the latest stable version from PyPI using:
@@ -132,9 +99,46 @@ export KERAS_BACKEND=jax
13299

133100
This way, you also don't have to manually set the backend every time you are starting Python to use BayesFlow.
134101

135-
**Caution:** Some development environments (e.g., VSCode or PyCharm) can silently overwrite environment variables. If you have set your backend as an environment variable and you still get keras-related import errors when loading BayesFlow, these IDE shenanigans might be the culprit. Try setting the keras backend in your Python script via `import os; os.environ["KERAS_BACKEND"] = "<YOUR-BACKEND>"`.
102+
## Getting Started
103+
104+
Using the high-level interface is easy, as demonstrated by the minimal working example below:
105+
106+
```python
107+
import bayesflow as bf
108+
109+
workflow = bf.BasicWorkflow(
110+
inference_network=bf.networks.CouplingFlow(),
111+
summary_network=bf.networks.TimeSeriesNetwork(),
112+
inference_variables=["parameters"],
113+
summary_variables=["observables"],
114+
simulator=bf.simulators.SIR()
115+
)
116+
117+
history = workflow.fit_online(epochs=15, batch_size=32, num_batches_per_epoch=200)
118+
119+
diagnostics = workflow.plot_default_diagnostics(test_data=300)
120+
```
121+
122+
For an in-depth exposition, check out our expanding list of resources below.
123+
124+
### Books
125+
126+
Many examples from [Bayesian Cognitive Modeling: A Practical Course](https://bayesmodels.com/) by Lee & Wagenmakers (2013) in [BayesFlow](https://kucharssim.github.io/bayesflow-cognitive-modeling-book/).
127+
128+
### Tutorial notebooks
129+
130+
1. [Linear regression starter example](examples/Linear_Regression_Starter.ipynb)
131+
2. [From ABC to BayesFlow](examples/From_ABC_to_BayesFlow.ipynb)
132+
3. [Two moons starter example](examples/Two_Moons_Starter.ipynb)
133+
4. [Rapid iteration with point estimators](examples/Lotka_Volterra_Point_Estimation_and_Expert_Stats.ipynb)
134+
5. [SIR model with custom summary network](examples/SIR_Posterior_Estimation.ipynb)
135+
6. [Bayesian experimental design](examples/Bayesian_Experimental_Design.ipynb)
136+
7. [Simple model comparison example](examples/One_Sample_TTest.ipynb)
137+
8. [Moving from BayesFlow v1.1 to v2.0](examples/From_BayesFlow_1.1_to_2.0.ipynb)
138+
139+
More tutorials are always welcome! Please consider making a pull request if you have a cool application that you want to contribute.
136140

137-
### From Source
141+
## Contributing
138142

139143
If you want to contribute to BayesFlow, we recommend installing it from source, see [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
140144

0 commit comments

Comments
 (0)