mirror of
https://github.com/IBM/ai-privacy-toolkit.git
synced 2026-07-11 16:22:10 +02:00
Add a risk score to the base class DatasetAttackScore, so that every implementation could set it based on its specific values.
Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
This commit is contained in:
parent
8a4df5a4a2
commit
80bec0c45b
7 changed files with 53 additions and 36 deletions
|
|
@ -39,8 +39,8 @@ class KNNAttackStrategyUtils(AttackStrategyUtils):
|
|||
:param query_samples: query samples, to which nearest neighbors are to be found
|
||||
:param knn_learner: unsupervised learner for implementing neighbor searches, after it was fitted
|
||||
:param distance_processor: function for processing the distance into another more relevant metric per sample.
|
||||
Its input is an array representing distances (the distances returned by NearestNeighbors.kneighbors() ),
|
||||
and the output should be another array with distance-based values that enable to compute the final score
|
||||
Its input is an array representing distances (the distances returned by NearestNeighbors.kneighbors() ), and
|
||||
the output should be another array with distance-based values that enable to compute the final risk score
|
||||
:return:
|
||||
distances of the query samples to their nearest neighbors, or a metric based on that distance and calculated
|
||||
by the distance_processor function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue