nvflare.app_common.statistics.histogram_bins_cleanser module

class HistogramBinsCleanser(max_bins_percent)[source]

Bases: FLComponent, StatisticsPrivacyCleanser

max_bins_percent: max number of bins allowed in terms of percent of local data size.

Set this number to avoid number of bins equal or close equal to the data size, which can lead to data leak. for example: max_bins_percent = 10, means 10% number of bins < max_bins_percent /100 * local count

apply(statistics: dict, client_name: str) Tuple[dict, bool][source]
hist_bins_validate(client_name: str, statistics: Dict) Dict[str, Dict[str, bool]][source]