run_server_loop#

fedcausal.flower.lingam.run_server_loop(grid, *, n_clients, method='deflation', order=4, pruning='adaptive_lasso', lambda_selection='bic', min_clients=None)[source]#

Run a FedRCD method over grid and return the result.

Parameters:
gridGrid

Anything that can send and receive Flower messages.

n_clientsint

Number of supernodes to wait for before broadcasting.

method, order, pruning, lambda_selection

As in fedcausal.FedRCD. "exact" takes p - 1 rounds, the others one.

min_clientsint or None, optional

How many usable replies each round needs. Default n_clients, so a failed client stops the run; lower it to tolerate dropouts.

Returns:
RCDResult

The causal order and coefficient matrix, in the original variable indices: what the in-process solver gives on the same sites.

Raises:
ConfigurationError

If an option is not supported, or min_clients is not between 1 and n_clients.

ClientFailureError

If too few supernodes register, or too few reply in a round.

SchemaMismatchError

If the clients do not agree on their variables.