Skip to main content

Construct epsilon-machines to generate symbol sequences with ground truth causal structure and information-theoretic complexity for studying neural network learning dynamics.

Project description

A-Machine

A-Machine is a library for constructing epsilon-machines[^1] and other stochastic models for generating structured symbol sequences. It was created with the goal of generating data with ground truth causal structure and information-theoretic complexity for studying neural network learning dynamics and internal representations.

This is an early work in progress. Much more to come.

Installation

# CPU only
pip install a-machine

# With GPU support (requires CUDA 13)
pip install "a-machine[cuda]" --extra-index-url https://pypi.nvidia.com

## Quick Start

```python
from amachine.am_create import random_machine

# May have multiple recurrent subgraphs, terminal states, or tranistory states
m = random_machine( 
	n_states=11, 
	symbols=[ '0', '1', '2' ],
	connectedness=0.75,
	randomness=0.35 )

# Collapse to the largest recurrent subgraph
m.collapse_to_largest_strongly_connected_subgraph()

# Minimize the machine -> epsilon-machine.
m.minimize()

# Entropy rate, statistical complexity, excess entropy, crypticity 
print( f"h_mu : {m.h_mu()}" )
print( f"C_mu : {m.C_mu()}" )
print( f"Chi  : {m.Chi()}" )

# Draw the graph 
m.draw_graph( output_dir=".", show=True )

Author

Tyson A. Neuroth

tneuroth.gitlab.io

Citation

If you use this package in your research, please cite:

@software{a-machine,
  author = {Tyson A. Neuroth},
  title  = {A-Machine},
  year   = {2016},
  url    = {https://gitlab.com/tneuroth/a-machine}
}

License

MIT

References

[^1]: Crutchfield, James P., and Karl Young. "Inferring statistical complexity." Physical review letters 63.2 (1989): 105.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

a_machine-0.1.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

a_machine-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl (133.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

File details

Details for the file a_machine-0.1.1.tar.gz.

File metadata

  • Download URL: a_machine-0.1.1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for a_machine-0.1.1.tar.gz
Algorithm Hash digest
SHA256 78e088f38b2d561a80be60fabe4c198639d24852b8e5e79e813006f5f01e8173
MD5 a31890fa116a1df38532947b217677f5
BLAKE2b-256 d1a7a6638a18cf34f005cd374e6150a6f47311fc8295ccb849c725d2de78776e

See more details on using hashes here.

File details

Details for the file a_machine-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for a_machine-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8b417667054952c77338b24fa9db8cbd2e718a2659e17510b8d5654dd79b8ac3
MD5 8546b9260bd182da50bfa14c5711a965
BLAKE2b-256 1d321355322506a0eb5ff0dc77e04d767a7ba81d4e1fbd7a11eb1a08a6cf040b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page