Skip to content

Commit

Permalink
UPD: parameter's name
Browse files Browse the repository at this point in the history
  • Loading branch information
Candice Moyet committed Jul 10, 2023
1 parent 1eadfa5 commit 5e052cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mapie/conformity_scores/conformity_scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def get_conformity_scores(

@staticmethod
def get_quantile(
values: NDArray,
conformity_scores: NDArray,
alpha_np: NDArray,
axis: int,
method: str
Expand All @@ -222,7 +222,7 @@ def get_quantile(
Parameters
----------
values: NDArray of shape (n_samples,) or
conformity_scores: NDArray of shape (n_samples,) or
(n_samples, n_references)
Values from which the quantile is computed, it can be the
conformity scores or the conformity scores aggregated with
Expand All @@ -245,7 +245,7 @@ def get_quantile(
"""
quantile = np.column_stack([
np_nanquantile(
values.astype(float),
conformity_scores.astype(float),
_alpha,
axis=axis,
method=method
Expand Down Expand Up @@ -308,17 +308,17 @@ def get_bounds(
alpha_low = alpha_np if self.sym else alpha_np / 2
alpha_up = 1 - alpha_np if self.sym else 1 - alpha_np / 2

values_low = self.get_estimation_distribution(
conformity_scores_low = self.get_estimation_distribution(
X, y_pred_low, signed * conformity_scores
)
values_up = self.get_estimation_distribution(
conformity_scores_up = self.get_estimation_distribution(
X, y_pred_up, conformity_scores
)
bound_low = self.get_quantile(
values_low, alpha_low, axis=1, method="lower"
conformity_scores_low, alpha_low, axis=1, method="lower"
)
bound_up = self.get_quantile(
values_up, alpha_up, axis=1, method="higher"
conformity_scores_up, alpha_up, axis=1, method="higher"
)
else:
quantile_search = "higher" if self.sym else "lower"
Expand Down

0 comments on commit 5e052cd

Please sign in to comment.