Skip to content

Commit 4130745

Browse files
committed
🔨 Remove user warning in ClassTransformation
1 parent 3b7410a commit 4130745

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

sklift/models/models.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import warnings
21
import numpy as np
32
import pandas as pd
43
from sklearn.base import BaseEstimator
@@ -247,13 +246,6 @@ def fit(self, X, y, treatment, estimator_fit_params=None):
247246

248247
if self._type_of_target != 'binary':
249248
raise ValueError("This approach is only suitable for binary classification problem")
250-
_, treatment_counts = np.unique(treatment, return_counts=True)
251-
if treatment_counts[0] != treatment_counts[1]:
252-
warnings.warn(
253-
"It is recommended to use this approach on treatment balanced data. Current sample size is unbalanced.",
254-
category=UserWarning,
255-
stacklevel=2
256-
)
257249

258250
y_mod = (np.array(y) == np.array(treatment)).astype(int)
259251

0 commit comments

Comments
 (0)