Skip to content

Commit 0bfa24a

Browse files
committed
GSK-2625: fix OneHotEncoder
1 parent 7cb5a0c commit 0bfa24a

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

giskard/demo/titanic_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_model_and_df(model: str = ModelTypes.LOGISTIC_REGRESSION, max_iter: int
5757
cat_transormer = Pipeline(
5858
[
5959
("imputer", SimpleImputer(strategy="constant", fill_value="missing")),
60-
("onehot", OneHotEncoder(handle_unknown="ignore", sparse=False)),
60+
("onehot", OneHotEncoder(handle_unknown="ignore")),
6161
]
6262
)
6363

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ dependencies = [
156156
"zstandard>=0.10.0",
157157
"mlflow-skinny>=2",
158158
"numpy>=1.22.0",
159-
"scikit-learn>=1.0, <1.4.0", # TODO: GSK-2625
159+
"scikit-learn>=1.0",
160160
"scipy>=1.7.3",
161161
"mixpanel>=4.4.0",
162162
"requests>=2.19",

tests/fixtures/enron_multilabel_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def enron_raw_model(enron_raw_data: pd.DataFrame) -> Tuple[Pipeline, List[str]]:
152152
categorical_transformer = Pipeline(
153153
[
154154
("imputer", SimpleImputer(strategy="constant", fill_value="missing")),
155-
("onehot", OneHotEncoder(handle_unknown="ignore", sparse=False)),
155+
("onehot", OneHotEncoder(handle_unknown="ignore")),
156156
]
157157
)
158158

tests/fixtures/german_credit_scoring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def german_credit_raw_model(german_credit_raw_data):
112112
categorical_transformer = Pipeline(
113113
[
114114
("imputer", SimpleImputer(strategy="constant", fill_value="missing")),
115-
("onehot", OneHotEncoder(handle_unknown="ignore", sparse=False)),
115+
("onehot", OneHotEncoder(handle_unknown="ignore")),
116116
]
117117
)
118118

0 commit comments

Comments
 (0)