Skip to content

Commit

Permalink
Do not replace unknowns in HGBDT model
Browse files Browse the repository at this point in the history
  • Loading branch information
ccanel committed Feb 8, 2024
1 parent b1fcf30 commit 5edb334
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion unfair/model/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ def extract_fets(dat, split_name, net):
or np.isinf(dat_out[features.LABEL_FET]).any()
), f'Warning: NaNs or Infs in ground truth for split "{split_name}".'

replace_unknowns(dat_in, is_dt)
# HGBDT can handle unknowns, but other model types cannot.
if not isinstance(net, models.HistGbdtSklearnWrapper):
replace_unknowns(dat_in, is_dt)

# Convert output features to class labels.
dat_out = net.convert_to_class(dat_out)
Expand Down

0 comments on commit 5edb334

Please sign in to comment.