icpy package#

Submodules#

icpy.ICP module#

class icpy.ICP.ICP(S_hat, q_values, p_value)#

Bases: tuple

S_hat#

Alias for field number 0

p_value#

Alias for field number 2

q_values#

Alias for field number 1

icpy.ICP.all_parent_sets(S, max_num_parents)[source]#
icpy.ICP.f_test(x1, x2)[source]#

Perform F-test for equal variance.

icpy.ICP.invariant_causal_prediction(X, y, z, alpha=0.1)[source]#

Perform Invariant Causal Prediction.

Parameters:
  • X ((n, p) ndarray) – predictor variables

  • y ((n,) ndarray) – target variable, numpy array of shape (n)

  • Z (array_like) – index of environment, length(Z)==`n`

  • alpha (float) – Confidence level of the tests and FDR to control. \(P(\hat{S} \subset S^*) \geq 1-\mathtt{alpha}\)

Returns:

The identified causal parent set, \(\hat{S}\), as list of indices

Return type:

list

icpy.ICP.preselect_parents(X, y, n)[source]#
icpy.ICP.test_plausible_parent_set(X, y, z)[source]#

Module contents#