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