Skip to content

Commit

Permalink
Update sparse to sparse_output
Browse files Browse the repository at this point in the history
sklearn will deprecate sparse in favor of sparse_output, currently throwing warnings
  • Loading branch information
PatrikDurdevic committed Jul 14, 2023
1 parent c95fef3 commit ab32286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion btb/tuning/hyperparams/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ab32286

Please sign in to comment.