mirror of
https://github.com/IBM/ai-privacy-toolkit.git
synced 2026-05-13 22:12:37 +02:00
Fix issue with computed ranges for one-hot encoded features (#90)
Signed-off-by: abigailt <abigailt@il.ibm.com>
This commit is contained in:
parent
d8de062d43
commit
a8f5326572
2 changed files with 46 additions and 1 deletions
|
|
@ -576,7 +576,7 @@ class GeneralizeToRepresentative(BaseEstimator, MetaEstimatorMixin, TransformerM
|
|||
if feature not in feature_data.keys():
|
||||
fd = {}
|
||||
values = list(x.loc[:, feature])
|
||||
if feature not in self.categorical_features:
|
||||
if feature not in self.categorical_features and feature not in self.all_one_hot_features:
|
||||
fd['min'] = min(values)
|
||||
fd['max'] = max(values)
|
||||
fd['range'] = max(values) - min(values)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue