Skip to content

Commit 3d6f46b

Browse files
MTN - Revert formatting to avoid changes unrelated to current PR
1 parent ec3e8d0 commit 3d6f46b

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

mapie/risk_control.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111
from sklearn.multioutput import MultiOutputClassifier
1212
from sklearn.pipeline import Pipeline
1313
from sklearn.utils import check_random_state
14-
from sklearn.utils.validation import (
15-
_check_y, _num_samples, check_is_fitted,
16-
indexable,
17-
)
14+
from sklearn.utils.validation import (_check_y, _num_samples, check_is_fitted,
15+
indexable)
1816

1917
from numpy.typing import ArrayLike, NDArray
2018
from .control_risk.crc_rcps import find_lambda_star, get_r_hat_plus
@@ -220,9 +218,8 @@ def _check_method(self) -> None:
220218
"Invalid method for metric: "
221219
+ "You are controlling " + self.metric_control
222220
+ " and you are using invalid method: " + self.method
223-
+ ". Use instead: " + "".join(
224-
self.valid_methods_by_metric_[
225-
self.metric_control]
221+
+ ". Use instead: " + "".join(self.valid_methods_by_metric_[
222+
self.metric_control]
226223
)
227224
)
228225

@@ -368,10 +365,10 @@ def _check_estimator(
368365
LogisticRegression()
369366
)
370367
X_train, X_conf, y_train, y_conf = train_test_split(
371-
X,
372-
y,
373-
test_size=self.conformalize_size,
374-
random_state=self.random_state,
368+
X,
369+
y,
370+
test_size=self.conformalize_size,
371+
random_state=self.random_state,
375372
)
376373
estimator.fit(X_train, y_train)
377374
warnings.warn(
@@ -689,7 +686,7 @@ def predict(
689686
)
690687
self._check_valid_index(alpha_np)
691688
self.lambdas_star, self.r_star = find_lambda_control_star(
692-
self.r_hat, self.valid_index, self.lambdas
689+
self.r_hat, self.valid_index, self.lambdas
693690
)
694691
y_pred_proba_array = (
695692
y_pred_proba_array >

0 commit comments

Comments
 (0)