FedXgbCyclic#
- class FedXgbCyclic(**kwargs: Any)[source]#
Bases:
FedAvg
Configurable FedXgbCyclic strategy implementation.
Methods
aggregate_evaluate
(server_round, results, ...)Aggregate evaluation metrics using average.
aggregate_fit
(server_round, results, failures)Aggregate fit results using bagging.
configure_evaluate
(server_round, parameters, ...)Configure the next round of evaluation.
configure_fit
(server_round, parameters, ...)Configure the next round of training.
evaluate
(server_round, parameters)Evaluate model parameters using an evaluation function.
initialize_parameters
(client_manager)Initialize global model parameters.
num_evaluation_clients
(num_available_clients)Use a fraction of available clients for evaluation.
num_fit_clients
(num_available_clients)Return the sample size and the required number of available clients.
- aggregate_evaluate(server_round: int, results: List[Tuple[ClientProxy, EvaluateRes]], failures: List[Tuple[ClientProxy, EvaluateRes] | BaseException]) Tuple[float | None, Dict[str, bool | bytes | float | int | str]] [source]#
Aggregate evaluation metrics using average.
- aggregate_fit(server_round: int, results: List[Tuple[ClientProxy, FitRes]], failures: List[Tuple[ClientProxy, FitRes] | BaseException]) Tuple[Parameters | None, Dict[str, bool | bytes | float | int | str]] [source]#
Aggregate fit results using bagging.
- configure_evaluate(server_round: int, parameters: Parameters, client_manager: ClientManager) List[Tuple[ClientProxy, EvaluateIns]] [source]#
Configure the next round of evaluation.
- configure_fit(server_round: int, parameters: Parameters, client_manager: ClientManager) List[Tuple[ClientProxy, FitIns]] [source]#
Configure the next round of training.
- evaluate(server_round: int, parameters: Parameters) Tuple[float, Dict[str, bool | bytes | float | int | str]] | None #
Evaluate model parameters using an evaluation function.
- initialize_parameters(client_manager: ClientManager) Parameters | None #
Initialize global model parameters.
- num_evaluation_clients(num_available_clients: int) Tuple[int, int] #
Use a fraction of available clients for evaluation.
- num_fit_clients(num_available_clients: int) Tuple[int, int] #
Return the sample size and the required number of available clients.