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.0.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.0-cp312-cp312-manylinux_2_34_x86_64.whl (133.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

File details

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

File metadata

  • Download URL: a_machine-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 2649a8480897df0aacb9847a25bd3e5d90536b13158b909e5aac4e432009be0c
MD5 47564a4aaf7c0236dba0c01c10805f2b
BLAKE2b-256 f31b933b0a19c9d0035319cffc940f77ff5d14ab74943996b8bc6bf066aecfae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a_machine-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0e8760f0923ca9510cac31e449083153a28a7305a7193d9b221784ce29958476
MD5 acf9d2b94127df87e085f0794d0ef066
BLAKE2b-256 060a98d4e3f7f82a7e31f06c4187aeb0a4cd07bdf79e29737fdf81eb9db4aeb2

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