From e38a8bed64768f5bb074e308029c531a7ea34b34 Mon Sep 17 00:00:00 2001 From: Piotr <pplonski86@gmail.com> Date: Mon, 4 Mar 2024 14:33:28 +0100 Subject: [PATCH] fix xgboost warning (#667) --- supervised/algorithms/xgboost.py | 2 +- supervised/tuner/optuna/xgboost.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/supervised/algorithms/xgboost.py b/supervised/algorithms/xgboost.py index 5d125c86..7c3c66ab 100644 --- a/supervised/algorithms/xgboost.py +++ b/supervised/algorithms/xgboost.py @@ -201,7 +201,7 @@ def fit( early_stopping_rounds=esr, evals_result=evals_result, verbose_eval=False, - feval=self.custom_eval_metric + custom_metric=self.custom_eval_metric # callbacks=[time_constraint] # callback slows down by factor ~8 ) diff --git a/supervised/tuner/optuna/xgboost.py b/supervised/tuner/optuna/xgboost.py index f64a641b..8d406c06 100644 --- a/supervised/tuner/optuna/xgboost.py +++ b/supervised/tuner/optuna/xgboost.py @@ -112,7 +112,7 @@ def __call__(self, trial): early_stopping_rounds=self.early_stopping_rounds, callbacks=[pruning_callback], verbose_eval=False, - feval=self.custom_eval_metric, + custom_metric=self.custom_eval_metric, ) preds = bst.predict( self.dvalidation, iteration_range=(0, bst.best_iteration)