Skip to content

Commit

Permalink
fix sklearn warnings (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Mar 4, 2024
1 parent c95abfd commit b8d0bce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion supervised/tuner/mljar_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ def boost_params(self, current_models, results_path, total_time_limit):
y = oof["target"]

if self._ml_task == MULTICLASS_CLASSIFICATION:
oh = OneHotEncoder(sparse=False)
oh = OneHotEncoder(sparse_output=False)
y_encoded = oh.fit_transform(np.array(y).reshape(-1, 1))
residua = np.sum(
np.abs(np.array(y_encoded) - np.array(predictions)), axis=1
Expand Down
2 changes: 1 addition & 1 deletion supervised/utils/shap.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_predictions(algorithm, X_vald, y_vald, ml_task):
predictions = algorithm.predict(X_vald)

if ml_task == MULTICLASS_CLASSIFICATION:
oh = OneHotEncoder(sparse=False)
oh = OneHotEncoder(sparse_output=False)
y_encoded = oh.fit_transform(np.array(y_vald).reshape(-1, 1))
residua = np.sum(np.abs(np.array(y_encoded) - predictions), axis=1)
else:
Expand Down

0 comments on commit b8d0bce

Please sign in to comment.