Title: | Effective Information and Causal Emergence |
---|---|
Description: | Methods and utilities for causal emergence. Used to explore and compute various information theory metrics for networks, such as effective information, effectiveness and causal emergence. |
Authors: | Travis Byrum [aut, cre], Anshuman Swain [aut], Brennan Klein [aut], William Fagan [aut] |
Maintainer: | Travis Byrum <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.1.0 |
Built: | 2024-11-09 03:22:02 UTC |
Source: | https://github.com/travisbyrum/einet |
Given a microscale network, G
, this function iteratively checks different
coarse-grainings to see if it finds one with higher effective information.
causal_emergence(x, ...)
causal_emergence(x, ...)
x |
igraph or matrix object. |
... |
Span, and threshold parameters |
A list with letters and numbers.
g_micro - Graph of original micro-scale network.
g_macro - Graph of macro-scale network.
mapping - list
mapping from micro to macro scales giving
the largest increase in effective information.
ei_macro - Effective information of macro scale network.
ei_micro - Effective information of micro scale network.
ce - Numerical value for causal emergence.
graph <- matrix( cbind( c(0.0, 1.0, 0.0, 0.0), c(0.0, 0.0, 1.0, 0.0), c(0.0, 0.0, 0.0, 1.0), c(0.0, 0.0, 0.0, 0.0) ), nrow = 4 ) %>% igraph::graph.adjacency(mode = "directed") causal_emergence(graph)
graph <- matrix( cbind( c(0.0, 1.0, 0.0, 0.0), c(0.0, 0.0, 1.0, 0.0), c(0.0, 0.0, 0.0, 1.0), c(0.0, 0.0, 0.0, 0.0) ), nrow = 4 ) %>% igraph::graph.adjacency(mode = "directed") causal_emergence(graph)
check_network
returns processed graph.
check_network(graph)
check_network(graph)
graph |
igraph |
This is a pre-processing function that turns raw input into directed networks with edge weights.
Coarse-grains a network according to the specified macro_mapping and the types of macros that each macro is associated with.
create_macro(graph, mapping, macro_types, ...)
create_macro(graph, mapping, macro_types, ...)
graph |
igraph |
mapping |
List mapping from micro to macro nodes. |
macro_types |
List of node distribution types. |
... |
Passed arguments. |
Directed igraph graph object corresponding to a coarse-grained network
according to the mapping
of micro nodes onto macro nodes, given by mapping
.
Calculates the effective information (EI) of a network, , according to
the definition provided in Klein & Hoel, 2019. Here, we subtract the
average entropies of the out-weights of nodes in a network, WOUT_average
from the entropy of the average out-weights in the network, WIN_entropy.
effective_information(graph, effectiveness = FALSE)
effective_information(graph, effectiveness = FALSE)
graph |
igraph or matrix object. |
effectiveness |
Logical indicating whether or not to return network effectiveness. |
Numeric value indicating the effective information of the network.
graph <- matrix( cbind( c(0.0, 1.0, 0.0, 0.0), c(0.0, 0.0, 1.0, 0.0), c(0.0, 0.0, 0.0, 1.0), c(0.0, 0.0, 0.0, 0.0) ), nrow = 4 ) %>% igraph::graph.adjacency(mode = "directed") effective_information(graph)
graph <- matrix( cbind( c(0.0, 1.0, 0.0, 0.0), c(0.0, 0.0, 1.0, 0.0), c(0.0, 0.0, 0.0, 1.0), c(0.0, 0.0, 0.0, 0.0) ), nrow = 4 ) %>% igraph::graph.adjacency(mode = "directed") effective_information(graph)
for calculating effective information in networks. This can then be used to search for macroscale representations of a network such that the coarse grained representation has more effective information than the microscale, a phenomenon known as causal emergence.
Maintainer: Travis Byrum [email protected]
Authors:
Anshuman Swain [email protected]
Brennan Klein [email protected]
William Fagan [email protected]
Useful links:
Social network data of university karate club. Used for causal emergence benchmarking and testing.
karate
karate
Igraph object with 78 edges.
http://www-personal.umich.edu/~mejn/netdata/
Given a graph and a specified vector
of internal node(s), returns
the parents, the children, and the parents of the children of the
internal node(s).
mb(graph, nodes = igraph::V(graph))
mb(graph, nodes = igraph::V(graph))
graph |
igraph or matrix object. |
nodes |
Numeric vector of vertices. |
A list
of node descendants, parents, and neighbors.
This starts an example shiny app that allows for user inputed graph objects.
run_example()
run_example()
Given a potential mapping of the network and a new macro node, this function assigns a new macro node to the candidate node optimized for maximal accuracy.
select_macro(graph, macro, mapping, macro_types, ...)
select_macro(graph, macro, mapping, macro_types, ...)
graph |
igraph object of micro network |
macro |
numeric of possible macro node |
mapping |
List mapping from micro to macro nodes. |
macro_types |
List of node distribution types. |
... |
Passed arguments. |
List with igraph graph object corresponding to a coarse-grained network and updated node types.
Gives a stationary probability vector of a given network.
stationary(graph, zero_cutoff = 1e-10)
stationary(graph, zero_cutoff = 1e-10)
graph |
igraph or matrix object. |
zero_cutoff |
Numeric threshold for zero value. |
A numeric vector
corresponding to stationary distribution.
Update Markov Blanket
update_blanket(blanket, removal = NULL)
update_blanket(blanket, removal = NULL)
blanket |
List of previous markov blanket. |
removal |
Numeric vector for node removal. |