Skip to content

Commit

Permalink
remove sklearn base
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahmish committed Mar 18, 2024
1 parent 9046d1b commit ddd65dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cardea/primitives/processing/categorizer.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import numpy as np
import pandas as pd
from sklearn.base import TransformerMixin


class Categorizer(TransformerMixin):
class Categorizer():
"""Transform categorical values into numerical codes.
"""

Expand All @@ -19,6 +18,7 @@ def fit(self, y):
def transform(self, y):
if y is None:
return y

return pd.Categorical(y, categories=self.categories).codes

def inverse_transform(self, y_codes):
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'bumpversion>=0.5.3',
'pip>=9.0.1',
'watchdog>=0.8.3',
'jedi<0.18',

# docs
'm2r2>=0.2.5,<0.3',
Expand Down

0 comments on commit ddd65dc

Please sign in to comment.