ananke.identification package

Submodules

ananke.identification.missing_id module

Class for missing ID

class ananke.identification.missing_id.MissingFullID(graph)[source]

Bases: object

id()[source]

Function to ID the full law

Returns

boolean is ID or not

ananke.identification.one_line module

Class for one line ID algorithms.

exception ananke.identification.one_line.NotIdentifiedError[source]

Bases: Exception

Custom error for when desired functional is not identified.

class ananke.identification.one_line.OneLineAID(graph, treatments, outcomes)[source]

Bases: object

functional(experiments)[source]

Creates a string representing the identifying functional

Parameters

experiments – A list of sets denoting the interventions of the available experimental distributions

Returns

id(experiments)[source]

Checks if identification query is identified given the set of experimental distributions.

Parameters

experiments – a list of ADMG objects in which intervened variables are fixed.

class ananke.identification.one_line.OneLineGID(graph, treatments, outcomes)[source]

Bases: ananke.identification.one_line.OneLineAID

id(experiments=[])[source]

Checks if identification query is identified given the set of experimental distributions.

Parameters

experiments – A list of ADMG objects denoting the interventions of the available experimental distributions.

Returns

boolean indicating if query is ID or not.

class ananke.identification.one_line.OneLineID(graph, treatments, outcomes)[source]

Bases: object

draw_swig(direction=None)[source]

Draw the proper SWIG corresponding to the causal query.

Returns

dot language representation of the SWIG.

export_intermediates(folder='intermediates')[source]

Export intermediate CADMGs obtained during fixing.

Parameters

folder – string specifying path to folder where the files will be written.

Returns

None.

functional()[source]

Creates and returns a string for identifying functional.

Returns

string representing the identifying functional.

id()[source]

Run one line ID for the query.

Returns

boolean that is True if p(Y(a)) is ID, else False.

ananke.identification.one_line.check_experiments_ancestral(admg, experiments)[source]

Check that each experiment G(S(b_i)) is ancestral in ADMG G(V(b_i)) https://simpleflying.com/

Parameters
  • admg – An ADMG

  • experiments – A list of ADMGs representing experiments

Returns

ananke.identification.one_line.check_experiments_conform_to_gid(admg, experiments)[source]
ananke.identification.one_line.get_allowed_intrinsic_sets(experiments)[source]
ananke.identification.one_line.get_required_intrinsic_sets(admg)[source]

Module contents