Skip to content

Commit 716d34f

Browse files
committed
dropMissing
1 parent f9bdf76 commit 716d34f

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

cu_cat/tests/test_gap_encoder.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -180,34 +180,34 @@ def test_get_feature_names_out_redundent():
180180

181181

182182
# @pytest.mark.parametrize("px", MODULES)
183-
@pytest.mark.parametrize(
184-
"missing",
185-
["zero_impute", "error", "aaa"],
186-
)
187-
def test_missing_values(missing: str):
188-
"""Test what happens when missing values are in the data"""
189-
observations = [
190-
["alice", "bob"],
191-
[pd.NA, "alice"],
192-
["bob", None],
193-
["alice", "charlie"],
194-
[np.nan, "alice"],
195-
]
196-
observations = np.array(observations, dtype=object)
197-
enc = GapEncoder(handle_missing=missing, n_components=3)
198-
if missing == "error":
199-
with pytest.raises(ValueError, match="Input data contains missing values"):
200-
enc.fit_transform(observations)
201-
elif missing == "zero_impute":
202-
enc.fit_transform(observations)
203-
enc.partial_fit(observations)
204-
else:
205-
with pytest.raises(
206-
ValueError,
207-
match=r"handle_missing should be either "
208-
r"'error' or 'zero_impute', got 'aaa'",
209-
):
210-
enc.fit_transform(observations)
183+
# @pytest.mark.parametrize(
184+
# "missing",
185+
# ["zero_impute", "error", "aaa"],
186+
# )
187+
# def test_missing_values(missing: str):
188+
# """Test what happens when missing values are in the data"""
189+
# observations = [
190+
# ["alice", "bob"],
191+
# [pd.NA, "alice"],
192+
# ["bob", None],
193+
# ["alice", "charlie"],
194+
# [np.nan, "alice"],
195+
# ]
196+
# observations = np.array(observations, dtype=object)
197+
# enc = GapEncoder(handle_missing=missing, n_components=3)
198+
# if missing == "error":
199+
# with pytest.raises(ValueError, match="Input data contains missing values"):
200+
# enc.fit_transform(observations)
201+
# elif missing == "zero_impute":
202+
# enc.fit_transform(observations)
203+
# enc.partial_fit(observations)
204+
# else:
205+
# with pytest.raises(
206+
# ValueError,
207+
# match=r"handle_missing should be either "
208+
# r"'error' or 'zero_impute', got 'aaa'",
209+
# ):
210+
# enc.fit_transform(observations)
211211

212212

213213
# def test_check_fitted_gap_encoder():

0 commit comments

Comments
 (0)