<jupyter_start><jupyter_text>This file provides a few basic examples of Neet usage.First let's load an example network.  There are a number of example networks in `neet.boolean.examples`.  The `s_pombe` network represents the interactions among 9 components that define the cell cycle of *S. pombe* (fission yeast).<jupyter_code>from neet.boolean.examples import s_pombe
s_pombe.size<jupyter_output><empty_output><jupyter_text>The most fundamental aspect of a Neet network is the `update` function, which defines the network's dynamics.  The `update` function takes a network state at timestep `t` and outputs the resulting state at `t+1`:<jupyter_code>s_pombe.update([0,0,0,0,0,0,0,0,0])<jupyter_output><empty_output><jupyter_text>The "informational architecture" of a Neet network encapsulates computation of quantities such as active information, entropy rate, transfer entropy, and mutual information.<jupyter_code>from neet.information import Architecture
k = 2 # the history length, the size of each sample in information calculations
timesteps = 5 # the number of timesteps taken from all possible starting points to create samples
arch = Architecture(s_pombe, k, timesteps)
# the active information for each node
arch.active_information()
# the mutual information between a pair of nodes
node1index,node2index = 3,5
arch.mutual_information()[node1index,node2index]<jupyter_output><empty_output><jupyter_text>The average sensitivity measures the degree to which single bit flips lead to changes that spread through the system.<jupyter_code>import neet.sensitivity as ns
ns.average_sensitivity(s_pombe)<jupyter_output><empty_output><jupyter_text>Neet can tell you which edges in the network are canalizing.<jupyter_code>ns.canalizing_edges(s_pombe)<jupyter_output><empty_output><jupyter_text>If `networkx` and `pygraphviz` are installed, the `draw` function outputs an image representing the causal structure of the network.<jupyter_code>s_pombe.draw(labels='names')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07442557442557443, 'fraction_numerical': 0.00949050949050949, 'mean_word_length': 7.415966386554622, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '652585', 'license': 'MIT', 'n_tokens_mistral': 613, 'n_tokens_neox': 592, 'n_words': 204, 'path': 'examples/basic-examples.ipynb', 'repo_name': 'thyamu/Neet', 'size': '2002'}