wmayner / pyphi

A toolbox for integrated information theory.
https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1006343
Other
368 stars 98 forks source link

Adds _extended_purview attribute to Causal Links + pretty formatting of extended_purview #23

Closed renzocom closed 4 years ago

renzocom commented 5 years ago

In actual causation, when computing causal links, it often occurs that purviews have the same alpha. Currently, the find_causal_link() method returns one arbitrary purview from the ones with maximum alpha. The find_causal_link() method now adds a hidden attribute _extended_purview to the returned CausalLink with all the purviews with equivalent maximum alpha which are not supersets of each other. For example, if purviews (A,B), (B,C), (A,B,D) have the same maximum alpha, the extended purview is ((A,B),(B,C)).

I've also added pretty formatting methods to print the CausalLinks when they have extended purviews so they look like: α = 0.415 [[S1, A], [A, D]] ◀━━ [M1]

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.003%) to 93.835% when pulling 40a0c631ca5bf35c21dea086b4e719f6869fc46e on renzocom:develop into d96528924d293b577566123b8d875b52a4a5cc1b on wmayner:develop.

wmayner commented 5 years ago

Thanks for the PR @renzocom! The next thing to do is update the tests so that they check the new behavior (and pass); see here for how to run the tests on your local machine.

wmayner commented 4 years ago

@renzocom sup

renzocom commented 4 years ago

@renzocom sup

SUP WILL

wmayner commented 4 years ago

Nice work Renzo🥇