Skip to content

Commit

Permalink
Merge pull request #1238 from mindsdb/feature/bump_sk_pkgs
Browse files Browse the repository at this point in the history
Bumped `sktime` to >=0.30.0 and `scikit-learn` to >=1.5.0
  • Loading branch information
ZoranPandovski authored Dec 5, 2024
2 parents 102bc5c + 404eb1c commit dd28eac
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 64 deletions.
2 changes: 1 addition & 1 deletion lightwood/analysis/nc/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def analyze(self, info: Dict[str, object], **kwargs) -> Dict[str, object]:
all_classes = np.array([ns.encoded_val_data.encoders[ns.target].rev_map[idx] for idx in class_keys])

if data_type != dtype.tags:
enc = OneHotEncoder(sparse=False, handle_unknown='ignore')
enc = OneHotEncoder(sparse_output=False, handle_unknown='ignore')
enc.fit(all_classes.reshape(-1, 1))
output['label_encoders'] = enc # needed to repr cat labels inside nonconformist
else:
Expand Down
2 changes: 1 addition & 1 deletion lightwood/encoder/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CatNormalizer:
def __init__(self, encoder_class='one_hot'):
self.encoder_class = encoder_class
if encoder_class == 'one_hot':
self.scaler = OneHotEncoder(sparse=False, handle_unknown='ignore')
self.scaler = OneHotEncoder(sparse_output=False, handle_unknown='ignore')
else:
self.scaler = OrdinalEncoder()

Expand Down
Loading

0 comments on commit dd28eac

Please sign in to comment.