nvflare.app_opt.xgboost.histogram_based_v2.sec.partial_he.adder module¶
- class Adder(max_workers=10)[source]¶
Bases:
object- add(encrypted_numbers, features, sample_groups=None, encode_sum=True)[source]¶
- Parameters:
encrypted_numbers – list of encrypted numbers (combined gh), one for each sample
features – list of tuples of (feature_id, mask, num_bins), one for each feature. size of mask = size of encrypted_numbers: there is a bin number for each sample num_bins specifies the number of bins for the feature
sample_groups – list of sample groups, each group is a tuple of (group_id, id_list) group_id is the group id, id_list is a list of sample IDs for which the add will be applied to
encode_sum – if true, encode the sum into a JSON string
- Returns: list of tuples of (feature_id, group_id, sum), sum is the result of adding encrypted values of
samples in the group for the feature.