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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2649a8480897df0aacb9847a25bd3e5d90536b13158b909e5aac4e432009be0c
|
|
| MD5 |
47564a4aaf7c0236dba0c01c10805f2b
|
|
| BLAKE2b-256 |
f31b933b0a19c9d0035319cffc940f77ff5d14ab74943996b8bc6bf066aecfae
|
File details
Details for the file a_machine-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: a_machine-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 133.5 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e8760f0923ca9510cac31e449083153a28a7305a7193d9b221784ce29958476
|
|
| MD5 |
acf9d2b94127df87e085f0794d0ef066
|
|
| BLAKE2b-256 |
060a98d4e3f7f82a7e31f06c4187aeb0a4cd07bdf79e29737fdf81eb9db4aeb2
|