Baselines

CausalDisco.baselines.r2_sort_regress(X)[source]

Perform sort_regress using \(R^2\) as ordering criterion.

Parameters:

X – Data (\(n \times d\) np.array).

Returns:

Candidate causal structure matrix with coefficients.

CausalDisco.baselines.random_sort_regress(X, seed=None)[source]

Perform sort_regress using a random order.

Parameters:
  • X – Data (\(n imes d\) np.array).

  • seed (optional) – random seed (integer)

Returns:

Candidate causal structure matrix with coefficients.

CausalDisco.baselines.sort_regress(X, scores)[source]

Regress each variable onto all predecessors in the ordering implied by the scores.

Parameters:
  • X – Data (\(n imes d\) np.array).

  • scores – Vector of scores (np.array with \(d\) entries).

Returns:

Candidate causal structure matrix with coefficients

CausalDisco.baselines.var_sort_regress(X)[source]

Perform sort_regress using variances as ordering criterion.

Parameters:

X – Data (\(n \times d\) np.array).

Returns:

Candidate causal structure matrix with coefficients.