mirror of
https://github.com/IBM/ai-privacy-toolkit.git
synced 2026-04-25 04:46:21 +02:00
fix
This commit is contained in:
parent
8aa7bb8281
commit
5b3476071f
1 changed files with 1 additions and 4 deletions
|
|
@ -108,10 +108,7 @@ class Anonymize:
|
|||
# TODO: should we filter only those with majority label? (using hist)
|
||||
rows = x[indexes]
|
||||
for feature in self.quasi_identifiers:
|
||||
if type(x) == np.ndarray:
|
||||
values = rows[:, feature]
|
||||
else: # pandas
|
||||
values = rows.loc[:, feature]
|
||||
values = rows[:, feature]
|
||||
if self.categorical_features and feature in self.categorical_features:
|
||||
# find most common value
|
||||
cell['representative'][feature] = Counter(values).most_common(1)[0][0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue