Skip to content

Commit

Permalink
Fix CI calculation in SlicePlot (#3404)
Browse files Browse the repository at this point in the history
Summary:

As titled. Added comments as well to show whats going on.

Differential Revision: D69987525
  • Loading branch information
mpolson64 authored and facebook-github-bot committed Feb 21, 2025
1 parent 63a1eaf commit 82b5929
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ax/analysis/plotly/surface/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def _prepare_data(
{
parameter_name: xs[i],
f"{metric_name}_mean": predictions[0][metric_name][i],
f"{metric_name}_sem": predictions[1][metric_name][metric_name][i],
f"{metric_name}_sem": predictions[1][metric_name][metric_name][i]
** 0.5, # Convert the variance to the SEM
}
for i in range(len(xs))
]
Expand All @@ -145,6 +146,7 @@ def _prepare_plot(
) -> go.Figure:
x = df[parameter_name].tolist()
y = df[f"{metric_name}_mean"].tolist()
# Convert the SEMs to 95% confidence intervals
y_upper = (df[f"{metric_name}_mean"] + 1.96 * df[f"{metric_name}_sem"]).tolist()
y_lower = (df[f"{metric_name}_mean"] - 1.96 * df[f"{metric_name}_sem"]).tolist()

Expand Down

0 comments on commit 82b5929

Please sign in to comment.