Skip to content

Commit e1409e9

Browse files
committed
Change sklearn model type to one that exists in Python 3.6
1 parent 68e1e3d commit e1409e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/integration/test_write_json_files.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717

1818
def _classification_model(data, target):
19-
from sklearn.ensemble import HistGradientBoostingClassifier
19+
from sklearn.tree import DecisionTreeClassifier
2020
from sklearn.model_selection import train_test_split
2121

22-
data = pd.get_dummies(data, drop_first=True)
22+
data = pd.get_dummies(data, drop_first=True).fillna(data.mean())
2323
x_train, x_test, y_train, y_test = train_test_split(
2424
data.drop(columns=target), data[target], test_size=0.3
2525
)
2626

27-
model = HistGradientBoostingClassifier()
27+
model = DecisionTreeClassifier()
2828
model.fit(x_train, y_train)
2929

3030
return model, x_test, y_test

0 commit comments

Comments
 (0)