Skip to content

Commit

Permalink
updated a few more calls to OneHotEncoder
Browse files Browse the repository at this point in the history
  • Loading branch information
MinuraPunchihewa committed Dec 4, 2024
1 parent db8038e commit 404eb1c
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 404eb1c

Please sign in to comment.