Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/expected categories #1597

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Fix pre-commit hook complaints
  • Loading branch information
ColdTeapot273K committed Oct 1, 2024
commit 58f237c1f4203bd9de4072431aae4fafeabf574c
1 change: 1 addition & 0 deletions river/preprocessing/one_hot.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def __init__(self, categories: dict | None = None, drop_zeros=False, drop_first=
self.drop_zeros = drop_zeros
self.drop_first = drop_first
self.categories = categories
self.values: collections.defaultdict | dict | None = None

if self.categories is None:
self.values = collections.defaultdict(set)
Expand Down
Loading