Skip to content

Commit 6a14c60

Browse files
committed
put in an absolute value for the psuedo prediction_std
1 parent 29653d1 commit 6a14c60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/workbench/model_scripts/uq_models/mapie.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def predict_fn(df, models) -> pd.DataFrame:
466466
df["q_50"] = df["prediction"]
467467

468468
# Calculate a pseudo-standard deviation from the 68% interval width
469-
df["prediction_std"] = (df["q_84"] - df["q_16"]) / 2.0
469+
df["prediction_std"] = (df["q_84"] - df["q_16"]).abs() / 2.0
470470

471471
# Reorder the quantile columns for easier reading
472472
quantile_cols = ["q_025", "q_05", "q_10", "q_16", "q_25", "q_75", "q_84", "q_90", "q_95", "q_975"]

0 commit comments

Comments
 (0)