nvflare.app_common.statistics.numeric_stats module
- accumulate_hists(metrics: Dict[str, Dict[str, Histogram]], global_hists: Dict[str, Dict[str, Histogram]], precision: int = 4) 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_global_stats(global_metrics: dict, client_metrics: dict, metric_task: str, statistic_configs: Dict[str, dict], precision: int = 4) dict[source]
- get_min_or_max_values(metrics: dict, global_metrics: dict, fn2, precision: int = 4) 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
precision – decimal number precision
Returns: Dict[dataset, Dict[feature, int]]