Skip to content

Commit

Permalink
add symetric option for gp cs
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentblot28 committed Jul 28, 2023
1 parent 2d30a19 commit 97a8cba
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions mapie/conformity_scores/residual_conformity_scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,10 +625,16 @@ def get_signed_conformity_scores(
std_estim,
self.eps
)
signed_conformity_scores = np.divide(
np.abs(np.subtract(y[cal_indexes], y_pred[cal_indexes])),
residuals_pred
)
if self.sym:
signed_conformity_scores = np.divide(
np.abs(np.subtract(y[cal_indexes], y_pred[cal_indexes])),
residuals_pred
)
else:
signed_conformity_scores = np.divide(
np.subtract(y[cal_indexes], y_pred[cal_indexes]),
residuals_pred
)

# reconstruct array with nan and conformity scores
complete_signed_cs = np.full(
Expand Down

0 comments on commit 97a8cba

Please sign in to comment.