tapas.attacks.set_classifiers.RandomTargetedQueryFeature
- class tapas.attacks.set_classifiers.RandomTargetedQueryFeature(target: TabularRecord, order: int, number: int, num_bins=None)
Bases:
tapas.attacks.set_classifiers.SetFeatureFeatures that computes random targeted queries that include the user.
These queries take the form SUM_{x in D} AND_{a in S} I{x_s = target_s}, counting all records that match the target record in all attributes in S. The set S is sampled randomly from all subsets of attributes of a fixed length (order).
This is equivalent to using entries of the order-way contingency table that count the target user as features. In particular, for order=1, this is a subset of HistSetFeature().
- __init__(target: TabularRecord, order: int, number: int, num_bins=None)
- Parameters
target (TabularRecord) – The record of the target user to attack.
order (int) – The number of conditions in each query.
number (int) – The number of queries to use.
num_bins (int) – How to bin continuous attributes (currently unsupported).
Methods
__init__(target, order, number[, num_bins])- param target
The record of the target user to attack.
extract(datasets)Compute queries on each dataset.
Attributes
label- extract(datasets)
Compute queries on each dataset.