Acyclic Union-Graphs
- class NoUnionCycles
Bases:
IConstructStateSpaceCurrent baseline implementation.
Implements Algo. 3 from [RR25].
- __init__()
- construct_statespace(testing_backend: IProvideIndependenceAtoms, marked_tests: set[CI_Identifier], previous_graphs) IRepresentStateSpace
Implements functionality of interface
IConstructStateSpace.Construct state-space.
- Parameters:
testing_backend (IProvideIndependenceAtoms) – the independece-atom backend
marked_tests (set[CI_Identifier]) – the set of marked conditional independencies
previous_graphs (dict[IRepresentState,graph_t]) – state-specific graph for each state found in the previous iteration
- Returns:
state-space
- Return type:
- store_translated_ci(ci: CI_Identifier, implied_by: list[set[tuple]]) None
- translate_ci(ci: CI_Identifier) None
Translate detected indicators.
Implements phase II of Algo. 3 in [RR25].
- Parameters:
ci (CI_Identifier) – marked CI test
- class ModelIndicators_NoUnionCycles
Bases:
objectIn the current baseline implementation, in a first phase, model indicators are found as a maximum by semi-ordering based on indicator-implications.
Implements phase I of Algo. 3 from [RR25].
- __init__(testing_backend: IProvideIndependenceAtoms, marked_tests: set[CI_Identifier])
- class StateSpace
Bases:
IRepresentStateSpaceRepresents the state-space in the current baseline implementation.
- __init__(model_indicators: list[ModelIndicator] = [], marked_ci: set[CI_Identifier] = {})
- is_trivial() bool
- controls_ci(ci: CI_Identifier)
- states() list[State]
Implements functionality of interface
IRepresentStateSpace.States contained in this state-space.
- Returns:
list of states
- Return type:
list[IRepresentState]
- finalize(graphs: dict[IRepresentState, graph_t]) IPresentResult
Implements functionality of interface
IRepresentStateSpace.Translate to model-properties and transfer information between states into a result-summary.
- Parameters:
graphs (dict[IRepresentState,graph_t]) – state-specific graph for each state
- Returns:
the summarized result
- Return type:
- class State
Bases:
IRepresentStateRepresents a state in the current baseline implementation.
- __init__(state_space: StateSpace, model_indicator_active: dict[ModelIndicator, bool])
- state_space() IConstructStateSpace
Implements functionality of interface
IRepresentState.Get containing state-space.
- Returns:
state-space
- Return type:
- add_implication(ci: CI_Identifier)
- overwrites_ci(ci: CI_Identifier)
Implements functionality of interface
IRepresentState.Is this conditional independence marked?
- Parameters:
ci (CI_Identifier) – conditional independence
- Returns:
truth-value of CI being marked
- Return type:
bool
- get_ci_pseudo_value(ci: CI_Identifier)
Implements functionality of interface
IRepresentState.Get a (state-encoded) value for a marked conditional independence.
- Parameters:
ci (CI_Identifier) – marked conditional independence
- Returns:
state-specific dependence-value (true for dependent).
- Return type:
bool
- class ModelIndicator
Bases:
objectRepresents a model-indicator in the current baseline implementation.
- undirected_link: tuple
The link in the model on which a change was detected.
- representor: CI_Identifier
A representing test (this test is independent iff the model-indicator is zero.
- __init__(undirected_link: tuple, representor: CI_Identifier) None
- class StructuredResultWithTranslation
Bases:
IPresentResultRepresents the (translated and transfered) result/labeled union graph in the current baseline implementation.
- __init__(union_graph: graph_t, model_indicators: list[ModelIndicator], graphs: dict[IRepresentState, graph_t])
- union_graph() graph_t
Implements functionality of interface
IPresentResult.Get the union-graph
- Returns:
union-graph (tigramite encoded)
- Return type:
- state_graphs() list[graph_t]
Implements functionality of interface
IPresentResult.Get the state-specific graphs.
- Returns:
list of state-specific graphs (tigramite encoded)
- Return type:
list[graph_t]
- model_indicators() list
Implements functionality of interface
IPresentResult.Get the model-indicators. Translation is state-space-construction specific.
- Returns:
model-indicators
- Return type:
list
- class Unionize_Translate_Transfer_NoUnionCylces
Bases:
objectNamescope for helpers for constructiong a labeled union-graph.
- static unionize_edgemark(a, b)
- classmethod unionize_edge(a, b)
- classmethod unionize_and_transfer(graphs)
- classmethod obtain_translation_result(state_space: StateSpace, graphs: dict[IRepresentState, graph_t])
- class ResolveByRepresentor
Bases:
IResolveRegimeStructurePrimitive approximate resolution of model-indicators by representors.
- __init__(indicator_resolution_score: Callable[[BlockView], ndarray], data_mgr: IManageData, block_size: int)
- resolve_model_indicator(model_indicator: ModelIndicator) ndarray
Implements functionality of interface
IResolveRegimeStructure.Resolve a model-indicator.
- Parameters:
model_indicator (state-space construction specific encoding) – model-indicator
- Returns:
Resolved (in index-space) indicator.
- Return type:
np.ndarray