Skip to content

Commit 77e76a1

Browse files
committed
[no ci] docs: docstring for ContinuousApproximator
__init__ and build_adapter, related to #340.
1 parent 693d8ff commit 77e76a1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

bayesflow/approximators/continuous_approximator.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ class ContinuousApproximator(Approximator):
2020
"""
2121
Defines a workflow for performing fast posterior or likelihood inference.
2222
The distribution is approximated with an inference network and an optional summary network.
23+
24+
Parameters
25+
----------
26+
adapter : Adapter
27+
Adapter for data processing. You can use :py:meth:`build_adapter`
28+
to create it.
29+
inference_network : InferenceNetwork
30+
The inference network used for posterior or likelihood approximation.
31+
summary_network : SummaryNetwork, optional
32+
The summary network used for data summarization (default is None).
33+
**kwargs : dict, optional
34+
Additional arguments passed to the :py:class:`bayesflow.approximators.Approximator` class.
2335
"""
2436

2537
def __init__(
@@ -42,6 +54,17 @@ def build_adapter(
4254
inference_conditions: Sequence[str] = None,
4355
summary_variables: Sequence[str] = None,
4456
) -> Adapter:
57+
"""Create an :py:class:`~bayesflow.adapters.Adapter` suited for the approximator.
58+
59+
Parameters
60+
----------
61+
inference_variables : Sequence of str
62+
Names of the inference variables in the data
63+
inference_conditions : Sequence of str, optional
64+
Names of the inference conditions in the data
65+
summary_variables : Sequence of str, optional
66+
Names of the summary variables in the data
67+
"""
4568
adapter = Adapter.create_default(inference_variables)
4669

4770
if inference_conditions is not None:

0 commit comments

Comments
 (0)