Variable IDs
CITs are identified relative to variables involved. The variables themselves may be addressed by any totally ordered (wrt the less-equal operator) hashable type for example integers or tuples of integers.
- var_index: TypeVar
CIT Identifiers
- class CI_Identifier
Bases:
Generic[var_index]A multi-index defining a conditional independence-statement
Note
The index type
var_indexmust be comparable (totally ordered) and hashable, eg int or tuple of int, type-annotations are given for the type-var var_index; for time-series, see alsoCI_Identifier_TimeSeries.- var_index = var_index
- __init__(idx_x: var_index, idx_y: var_index, idx_list_z: list[var_index])
Construct representation of CIT for single-variables X, Y and a list of indices for the variables in the set of conditios Z. The representation is undirected and for a (logical) set Z: Reordering X and Y or changing the order in the list of inices for Z will result in the same representation, see also
__hash__()and__eq__().
- __hash__() int
Hash for unordered containers (dict, set).
- Returns:
A hash value.
- Return type:
int
- __eq__(other: CI_Identifier) bool
Equality compare two CI-identifiers as undirected (X and Y are exchangable) test with a set (order does not matter) of condtions.
- Parameters:
other (CI_Identifier) – Other CI-Identifier to compare to.
- Returns:
Equality
- Return type:
bool
- z_dim() int
Get dimension of (number of variables in) conditioning set Z.
- Returns:
dim(Z)
- Return type:
int
CIT Identifiers Timeseries
- class CI_Identifier_TimeSeries
Bases:
CI_Identifier[tuple[int,int]]A multi-index defining a conditional independence-statement for timeseries, using tigramite’s indexing-convention: Individual nodes are indexed by a pair (index, -lag).
- max_abs_timelag() int
Get the maximum (abolute) time-lag of any variable involved in the test. This means, the maximum over -lag for the lags stored in X, Y or any member of Z.
- Returns:
Maximum absolute time-lag.
- Return type:
int