FedXgbNnAvg

class FedXgbNnAvg(*args: Any, **kwargs: Any)[소스]

기반 클래스: FedAvg

Configurable FedXgbNnAvg strategy implementation.

경고

This strategy is deprecated, but a copy of it is available in Flower Baselines: https://github.com/adap/flower/tree/main/baselines/hfedxgboost.

메소드

aggregate_evaluate(server_round, results, ...)

Aggregate evaluation losses using weighted average.

aggregate_fit(server_round, results, failures)

Aggregate fit results using weighted average.

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]]

Aggregate evaluation losses using weighted average.

aggregate_fit(server_round: int, results: list[tuple[ClientProxy, FitRes]], failures: list[tuple[ClientProxy, FitRes] | BaseException]) tuple[Any | None, dict[str, bool | bytes | float | int | str]][소스]

Aggregate fit results using weighted average.

configure_evaluate(server_round: int, parameters: Parameters, client_manager: ClientManager) list[tuple[ClientProxy, EvaluateIns]]

Configure the next round of evaluation.

configure_fit(server_round: int, parameters: Parameters, client_manager: ClientManager) list[tuple[ClientProxy, FitIns]]

Configure the next round of training.

evaluate(server_round: int, parameters: Any) 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.