From ab32286719e0ada92719c6ed792c5eb408f713ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C4=90ur=C4=91evi=C4=87?= Date: Fri, 14 Jul 2023 16:56:12 -0400 Subject: [PATCH] Update sparse to sparse_output sklearn will deprecate sparse in favor of sparse_output, currently throwing warnings --- btb/tuning/hyperparams/categorical.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btb/tuning/hyperparams/categorical.py b/btb/tuning/hyperparams/categorical.py index 2b1c0123..4bd3d51a 100644 --- a/btb/tuning/hyperparams/categorical.py +++ b/btb/tuning/hyperparams/categorical.py @@ -49,7 +49,7 @@ def __init__(self, choices, default=NO_DEFAULT): self.dimensions = len(choices) self.cardinality = self.dimensions choices = np.array(choices, dtype='object') - self._encoder = OneHotEncoder(categories=[choices], sparse=False) + self._encoder = OneHotEncoder(categories=[choices], sparse_output=False) self._encoder.fit(choices.reshape(-1, 1)) def _within_hyperparam_space(self, values):