Skip to content

Commit 82b5929

Browse files
mpolson64facebook-github-bot
authored andcommitted
Fix CI calculation in SlicePlot (#3404)
Summary: As titled. Added comments as well to show whats going on. Differential Revision: D69987525
1 parent 63a1eaf commit 82b5929

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ax/analysis/plotly/surface/slice.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def _prepare_data(
130130
{
131131
parameter_name: xs[i],
132132
f"{metric_name}_mean": predictions[0][metric_name][i],
133-
f"{metric_name}_sem": predictions[1][metric_name][metric_name][i],
133+
f"{metric_name}_sem": predictions[1][metric_name][metric_name][i]
134+
** 0.5, # Convert the variance to the SEM
134135
}
135136
for i in range(len(xs))
136137
]
@@ -145,6 +146,7 @@ def _prepare_plot(
145146
) -> go.Figure:
146147
x = df[parameter_name].tolist()
147148
y = df[f"{metric_name}_mean"].tolist()
149+
# Convert the SEMs to 95% confidence intervals
148150
y_upper = (df[f"{metric_name}_mean"] + 1.96 * df[f"{metric_name}_sem"]).tolist()
149151
y_lower = (df[f"{metric_name}_mean"] - 1.96 * df[f"{metric_name}_sem"]).tolist()
150152

0 commit comments

Comments
 (0)