Repository navigation
chore: update ty to 0.0.44 #608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
a1df129
d899676
a798ca4
d181b0c
dbb50c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -366,16 +366,16 @@ def _aia( | |
|
|
||
| # Get all combinations of columns to be the quasi-identifiers | ||
| # This gets explosive when column count > 500 | ||
| training_columns = [str(column) for column in training_df.columns] | ||
| if len(training_df.columns) < 500: | ||
| qi_combos = list(itertools.combinations(training_df.columns, quasi_identifier_count)) | ||
| qi_combos = list(itertools.combinations(training_columns, quasi_identifier_count)) | ||
| else: | ||
| columns = list(training_df.columns) | ||
| qi_combos = [] | ||
| for i in range(len(columns) - quasi_identifier_count): | ||
| combo = set() | ||
| for i in range(len(training_columns) - quasi_identifier_count): | ||
| combo = [] | ||
| for j in range(quasi_identifier_count): | ||
| combo.add(columns[i + j]) | ||
| qi_combos.append(combo) | ||
| combo.append(training_columns[i + j]) | ||
| qi_combos.append(tuple(combo)) | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| np.random.seed(5) | ||
| np.random.shuffle(qi_combos) | ||
|
|
@@ -415,7 +415,6 @@ def _aia( | |
|
|
||
| # As we process the attack dataset, we'll accumulate for each column the number of | ||
| # correct and incorrect predictions | ||
| training_columns = [str(column) for column in training_df.columns] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did this just need to be defined earlier?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the intent was to define |
||
| correct = {predict_column: 0 for predict_column in training_columns} | ||
| incorrect = {predict_column: 0 for predict_column in training_columns} | ||
|
|
||
|
|
@@ -578,7 +577,8 @@ def _aia( | |
| for i in range(len(entropy)): | ||
| entropy_wts.append(0) | ||
| else: | ||
| arr = (entropy - min(entropy)) / (max(entropy) - min(entropy)) | ||
| entropy_arr = np.asarray(entropy, dtype=float) | ||
| arr = (entropy_arr - min(entropy)) / (max(entropy) - min(entropy)) | ||
| entropy_wts = arr / arr.sum() | ||
|
|
||
| i = 0 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.