@@ -15,14 +15,14 @@ class ScoringRule:
1515 when sampling from the true distribution. By minimizing an expected score, estimates with
1616 different properties can be obtained.
1717
18- To define a custom :class:`ScoringRule`, inherit from this class and overwrite the score method.
18+ To define a custom :py: class:`ScoringRule`, inherit from this class and overwrite the score method.
1919 For proper serialization, any new constructor arguments must be taken care of in a `get_config` method.
2020
2121 Estimates are typically parameterized by projection heads consisting of a neural network component
2222 and a link to project into the correct output space.
2323
24- A :class:`ScoringRule` can score estimates consisting of multiple parts. See :class:`MultivariateNormalScore`
25- for an example of a :class:`ParametricDistributionScore`. That score evaluates an estimated mean
24+ A :py: class:`ScoringRule` can score estimates consisting of multiple parts. See :py :class:`MultivariateNormalScore`
25+ for an example of a :py: class:`ParametricDistributionScore`. That score evaluates an estimated mean
2626 and covariance simultaneously.
2727 """
2828
@@ -34,7 +34,7 @@ class ScoringRule:
3434 Prediction heads can output estimates in spaces other than the target distribution space.
3535 To such estimates the adapter cannot be straightforwardly applied in inverse direction,
3636 because the adapter is built to map vectors from the inference variable space. When subclassing
37- :class:`ScoringRule`, add the names of such heads to the following list to warn users about difficulties
37+ :py: class:`ScoringRule`, add the names of such heads to the following list to warn users about difficulties
3838 with a type of estimate whenever the adapter is applied to them in inverse direction.
3939 """
4040
@@ -128,7 +128,7 @@ def get_head(self, key: str, output_shape: Shape) -> keras.Sequential:
128128 2. dense: A trainable linear projection with as many units as are required by the next component.
129129 3. reshape: Changes shape of output of projection to match requirements of next component.
130130 4. link: Transforms unconstrained values into a constrained space for the final estimator.
131- See :mod:`bayesflow.links` for examples.
131+ See :py: mod:`~ bayesflow.links` for examples.
132132
133133 This method initializes the components in reverse order to meet all requirements and returns them.
134134
@@ -138,7 +138,7 @@ def get_head(self, key: str, output_shape: Shape) -> keras.Sequential:
138138 Name of head for which to request a link.
139139 output_shape: Shape
140140 The necessary shape of estimated values for the given key as returned by
141- :func:`get_head_shapes_from_target_shape()`.
141+ :py: func:`get_head_shapes_from_target_shape()`.
142142
143143 Returns
144144 -------
@@ -181,7 +181,7 @@ def score(self, estimates: dict[str, Tensor], targets: Tensor, weights: Tensor)
181181
182182 Examples
183183 --------
184- The following shows how to score estimates with a :class:`MeanScore`. All :class:`ScoringRule` s
184+ The following shows how to score estimates with a :py: class:`MeanScore`. All :py: class:`ScoringRule`\ s
185185 follow this pattern, only differing in the structure of the estimates dictionary.
186186
187187 >>> import keras
@@ -207,7 +207,7 @@ def score(self, estimates: dict[str, Tensor], targets: Tensor, weights: Tensor)
207207
208208 def aggregate (self , scores : Tensor , weights : Tensor = None ) -> Tensor :
209209 """
210- Computes the mean of scores, optionally applying weights.
210+ Computes the mean of ** scores** , optionally applying ** weights** .
211211
212212 This function computes the mean value of the given scores. When weights are provided,
213213 it first multiplies the scores by the weights and then computes the mean of the result.
@@ -224,8 +224,8 @@ def aggregate(self, scores: Tensor, weights: Tensor = None) -> Tensor:
224224 Returns
225225 -------
226226 Tensor
227- The aggregated score computed as a weighted mean if ` weights` is provided,
228- or as the simple mean of ` scores` otherwise.
227+ The aggregated score computed as a weighted mean if ** weights** is provided,
228+ or as the simple mean of ** scores** otherwise.
229229 """
230230
231231 if weights is not None :
0 commit comments