https://github.com/csc-uw/graphiit

Personal utilities for building PyPhi networks that need to be large and/or malleable.

https://github.com/csc-uw/graphiit

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.6%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Personal utilities for building PyPhi networks that need to be large and/or malleable.

Basic Info
  • Host: GitHub
  • Owner: CSC-UW
  • License: gpl-3.0
  • Language: Python
  • Default Branch: feature/iit-4.0
  • Size: 89.8 KB
Statistics
  • Stars: 6
  • Watchers: 3
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Created over 10 years ago · Last pushed about 2 years ago
Metadata Files
Readme License

README.rst

Graphiit
~~~~~~~~

Utilities for building `PyPhi `_ networks
that need to be large and/or malleable.


Installation
~~~~~~~~~~~~

You can install ``graphiit`` from `PyPi
`_::

    pip install graphiit

Or the latest development version from `Github
`_::

    pip install git+https://github.com/grahamfindlay/graphiit@develop


Basic Usage
~~~~~~~~~~~

At the core of ``graphiit`` is the ``Graph`` object.

    >>> from graphiit import Graph

``Graph`` takes a graph configuration as a parameter:

    >>> graph_config = [
        ('A', 'OR', 'B', 'C'),
        ('B', 'AND', 'A', 'C'),
        ('C', 'XOR', 'A', 'B')]
    >>> graph = Graph(graph_config)

Each line in the configuration specifies the name of a node, the mechanism that
the node implements, and the nodes in the network which input to the node. For
example, in the above configuration the line ``('A', 'OR', 'B', 'C')`` specifies
that node ``A`` is an OR-gate over the inputs ``B`` and ``C``.

Once we've initialized a ``Graph`` object, we can create a PyPhi ``Network``:

    >>> network = graph.pyphi_network()

That's it! You can now perform all IIT computations using this network.


Mechanisms
~~~~~~~~~~

While ``graphiit`` has a number of builtin mechanisms, you can easily specify
your own by defining a function which takes the states of the input nodes as a
parameter and returns ``True`` if the mechanism should be on and ``False`` if
it should be off.

    >>> def ALWAYS_ON(inputs):
    ...     return True

You can then use this function in the graph configuration:

    >>> graph_config = [('A', ALWAYS_ON, 'A')]
    >>> graph = Graph(graph_config)

See ``graphiit.mechanisms`` for implementations of the basic mechanisms.


Other Functionality
~~~~~~~~~~~~~~~~~~~

TODO

Owner

  • Name: The Center for Sleep and Consciousness
  • Login: CSC-UW
  • Kind: organization
  • Location: Madison, WI

University of Wisconsin–Madison

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 4
  • Total pull requests: 2
  • Average time to close issues: about 2 years
  • Average time to close pull requests: almost 2 years
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • 7beggars (4)
Pull Request Authors
  • wmayner (2)
  • rlmv (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • pytest *
  • twine *
setup.py pypi
  • networkx <2.0.0
  • numpy *
  • pyphi >=1.1.0