Skip to content

Commit 4befc04

Browse files
fix OneHot
1 parent f7871b8 commit 4befc04

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adapt/instance_based/_tradaboost.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,10 @@ def _boost(self, iboost, Xs, ys, Xt, yt,
320320

321321
if not isinstance(self, TrAdaBoostR2):
322322
if isinstance(estimator, BaseEstimator):
323-
ohe = OneHotEncoder(sparse=False)
323+
try:
324+
ohe = OneHotEncoder(sparse=False)
325+
except:
326+
ohe = OneHotEncoder(sparse_output=False)
324327
ohe.fit(y.reshape(-1, 1))
325328
ys = ohe.transform(ys)
326329
yt = ohe.transform(yt)

0 commit comments

Comments
 (0)