FedRCD#
- class fedcausal.lingam.FedRCD(method='deflation', order=4, pruning='adaptive_lasso', lambda_selection='bic')[source]#
Learn a linear non-Gaussian causal model from continuous data held by several sites.
Each site reduces its rows to additive moment sums; the server turns their totals into third- and fourth-order cumulants, from which a tau discriminator finds the causal order, and estimates the coefficients on it. No row leaves a site.
Torrijos, Stella, Gámez & Puerta, “Federated Causal Discovery via Regression-Directed Cumulants”, PGM 2026.
- Parameters:
- method{“deflation”, “exact”, “ratio”, “sort”}, default=”deflation”
What the server does after finding a source.
"deflation"removes it from the aggregated cumulants with regression coefficients and searches again, all in one round of communication."exact"has the sites deflate their own data instead, one round per variable, so no estimation error carries from one step to the next."ratio"deflates with cumulant-ratio coefficients, as FedISHC does."sort"sorts once by the tau discriminator.- order{3, 4}, default=4
Order of the cumulants behind the tau discriminator, and so of the moment sums the sites send. The fourth-order one needs excess kurtosis, the third-order one skew. FedISHC is
FedRCD(method="ratio", order=3)and FedHCFedRCD(method="sort", order=3); with a single site, HC-LiNGAM ismethod="sort"and HCmethod="exact". For data held in one place,causalbase.lingam.RCDtakes the same options.- pruning{“adaptive_lasso”, None}, default=”adaptive_lasso”
How coefficients are estimated on the order.
Noneis ordinary least squares, which keeps every predecessor as a parent.- lambda_selection{“bic”, “fixed”}, default=”bic”
Penalty selection for the adaptive lasso.
- Attributes:
- causal_order_list of str
The variables, most exogenous first.
- coef_ndarray of shape (n_vars, n_vars)
coef_[child, parent]is the coefficient of parent in child’s structural equation.- dag_DAG
The non-zero coefficients as a DAG.
adjacency_pandas.DataFramepandas.DataFrame: The learned DAG as a named adjacency matrix.
- n_features_in_int
- feature_names_in_ndarray of str
Methods
fit(X[, y])Learn the model from the sites' data.
get_params([deep])Return the estimator's hyperparameters by name.
set_params(**params)Set hyperparameters by name and return the estimator.
- fit(X, y=None)[source]#
Learn the model from the sites’ data.
- Parameters:
- Xsequence of ContinuousDataset, pandas.DataFrame or array-like
One table per site, all over the same variables.
- yNone
Ignored.
- Returns:
- self
- Raises:
- TypeError
If X is a single table rather than one per site.
- ValueError
If the sites disagree on their variables, hold too few rows between them, or a hyperparameter is out of range.
- property adjacency_#
pandas.DataFrame: The learned DAG as a named adjacency matrix.
- get_params(deep=True)#
Return the estimator’s hyperparameters by name.
- set_params(**params)#
Set hyperparameters by name and return the estimator.