You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
-
85
52
## Install
86
53
87
54
You can install the latest stable version from PyPI using:
@@ -132,9 +99,46 @@ export KERAS_BACKEND=jax
132
99
133
100
This way, you also don't have to manually set the backend every time you are starting Python to use BayesFlow.
134
101
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)
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/).
0 commit comments