nvflare.app_common.statistics.numeric_stats module¶
- accumulate_hists(metrics: Dict[str, Dict[str, Histogram]], global_hists: Dict[str, Dict[str, Histogram]]) Dict[str, Dict[str, Histogram]] [source]¶
- get_global_feature_data_types(client_feature_dts: Dict[str, Dict[str, List[Feature]]]) Dict[str, Dict[str, DataType]] [source]¶
- get_min_or_max_values(metrics: dict, global_metrics: dict, fn2) dict [source]¶
Use 2 argument function to calculate fn2(global, client), for example, min or max.
Note
The global min/max values are min/max of all clients and all datasets.
- Parameters:
metrics – client’s metric
global_metrics – global metrics
fn2 – two-argument function such as min or max
Returns: Dict[dataset, Dict[feature, int]]