models.actual_causation

Objects that represent structures used in actual causation.

pyphi.models.actual_causation.greater_than_zero(alpha)

Return True if alpha is greater than zero, accounting for numerical errors.

class pyphi.models.actual_causation.AcRepertoireIrreducibilityAnalysis(alpha, state, direction, mechanism, purview, partition, probability, partitioned_probability, node_labels=None)

A minimum information partition for ac_coef calculation.

These can be compared with the built-in Python comparison operators (<, >, etc.). First, \(\alpha\) values are compared. Then, if these are equal up to PRECISION, the size of the mechanism is compared.

alpha

This is the difference between the mechanism’s unpartitioned and partitioned actual probability.

Type:

float

state

state of system in specified direction (cause, effect)

Type:

tuple[int]

direction

The temporal direction specifiying whether this analysis should be calculated with cause or effect repertoires.

Type:

str

mechanism

The mechanism to analyze.

Type:

tuple[int]

purview

The purview over which the unpartitioned actual probability differs the least from the actual probability of the partition.

Type:

tuple[int]

partition

The partition that makes the least difference to the mechanism’s repertoire.

Type:

tuple[Part, Part]

probability

The probability of the state in the previous/next timestep.

Type:

float

partitioned_probability

The probability of the state in the partitioned repertoire.

Type:

float

unorderable_unless_eq = ['direction']
order_by()

Return a list of values to compare for ordering.

The first value in the list has the greatest priority; if the first objects are equal the second object is compared, etc.

__bool__()

An AcRepertoireIrreducibilityAnalysis is True if it has \(\alpha > 0\).

property phi

Alias for \(\alpha\) for PyPhi utility functions.

to_json()

Return a JSON-serializable representation.

A maximally irreducible actual cause or effect.

These can be compared with the built-in Python comparison operators (<, >, etc.). First, \(\alpha\) values are compared. Then, if these are equal up to PRECISION, the size of the mechanism is compared.

property alpha

The difference between the mechanism’s unpartitioned and partitioned actual probabilities.

Type:

float

property phi

Alias for \(\alpha\) for PyPhi utility functions.

property direction

Either CAUSE or EFFECT.

Type:

Direction

property mechanism

The mechanism for which the action is evaluated.

Type:

list[int]

property purview

The purview over which this mechanism’s \(\alpha\) is maximal.

Type:

list[int]

property extended_purview

List of purviews over which this causal link is maximally irreducible.

Note: It will contain multiple purviews iff causal link has undetermined actual causes/effects (e.g. two irreducible causes with same alpha over different purviews).

Type:

tuple[tuple[int]]

property ria

The irreducibility analysis for this mechanism.

Type:

AcRepertoireIrreducibilityAnalysis

property node_labels
unorderable_unless_eq = ['direction']
order_by()

Return a list of values to compare for ordering.

The first value in the list has the greatest priority; if the first objects are equal the second object is compared, etc.

__bool__()

An CausalLink is True if \(\alpha > 0\).

to_json()

Return a JSON-serializable representation.

class pyphi.models.actual_causation.Event(actual_cause, actual_effect)

A mechanism which has both an actual cause and an actual effect.

actual_cause

The actual cause of the mechanism.

Type:

CausalLink

actual_effect

The actual effect of the mechanism.

Type:

CausalLink

Create new instance of Event(actual_cause, actual_effect)

property mechanism

The mechanism of the event.

class pyphi.models.actual_causation.Account(causal_links)

The set of CausalLink with \(\alpha > 0\). This includes both actual causes and actual effects.

property irreducible_causes

The set of irreducible causes in this Account.

property irreducible_effects

The set of irreducible effects in this Account.

to_json()
classmethod from_json(dct)
class pyphi.models.actual_causation.DirectedAccount(causal_links)

The set of CausalLink with \(\alpha > 0\) for one direction of a transition.

class pyphi.models.actual_causation.AcSystemIrreducibilityAnalysis(alpha=None, direction=None, account=None, partitioned_account=None, transition=None, cut=None)

An analysis of transition-level irreducibility (\(\mathcal{A}\)).

Contains the \(\mathcal{A}\) value of the Transition, the causal account, and all the intermediate results obtained in the course of computing them.

alpha

The \(\mathcal{A}\) value for the transition when taken against this analysis, i.e. the difference between the unpartitioned account and this analysis’s partitioned account.

Type:

float

account

The account of the whole transition.

Type:

Account

partitioned_account

The account of the partitioned transition.

Type:

Account

transition

The transition this analysis was calculated for.

Type:

Transition

cut

The minimal partition.

Type:

ActualCut

property before_state

Return the actual previous state of the Transition.

property after_state

Return the actual current state of the Transition.

unorderable_unless_eq = ['direction']
order_by()

Return a list of values to compare for ordering.

The first value in the list has the greatest priority; if the first objects are equal the second object is compared, etc.

__bool__()

An AcSystemIrreducibilityAnalysis is True if it has \(\mathcal{A} > 0\).

to_json()