Skip to content

Commit de59fb8

Browse files
committed
more minor fixes to ECDF computation
1 parent 4c5781f commit de59fb8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

bayesflow/diagnostics/plots/calibration_ecdf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,10 @@ def calibration_ecdf(
143143

144144
# Plot individual ecdf of parameters
145145
for j in range(ranks.shape[-1]):
146-
ecdf_single = np.pad(np.sort(ranks[:, j]), (1, 1), constant_values=(0, 1))
147-
xx = ecdf_single
148-
yy = np.linspace(0, 1, num=xx.shape[-1])
146+
xx = np.repeat(np.sort(ranks[:, j]), 2)
147+
xx = np.pad(xx, (1, 1), constant_values=(0, 1))
148+
yy = np.linspace(0, 1, num=xx.shape[-1] // 2)
149+
yy = np.repeat(yy, 2)
149150

150151
# Difference, if specified
151152
if difference:

bayesflow/utils/plot_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def prepare_plot_data(
1717
num_row: int = None,
1818
figsize: tuple = None,
1919
stacked: bool = False,
20-
default_name: str = "var",
20+
default_name: str = "v",
2121
) -> Mapping[str, Any]:
2222
"""
2323
Procedural wrapper that encompasses all preprocessing steps, including shape-checking, parameter name
@@ -48,7 +48,7 @@ def prepare_plot_data(
4848
Size of the figure adjusting to the display resolution
4949
stacked : bool, optional, default: False
5050
Whether the plots are stacked horizontally
51-
default_name : str, optional (default = "var")
51+
default_name : str, optional (default = "v")
5252
The default name to use for estimates if None provided
5353
"""
5454

0 commit comments

Comments
 (0)