Skip to main content

belief-state-superposition

[Github Actions] Ruff pdm-managed Checked with pyright

Quickstart

Install

pip install belief-state-superposition

Usage

Generate and inspect data from a Hidden Markov Model

from belief_state_superposition.hmm import sample_sequence

data = sample_sequence(16)
beliefs, states, emissions, next_beliefs, next_states = zip(*data)
print(beliefs)
print(states)
print(emissions)

Train a model on belief states

import torch 
from torch.utils.data import DataLoader
from belief_state_superposition.model import init_model
from belief_state_superposition.data import get_dataset
from belief_state_superposition.train import train_model

device = "cuda" if torch.cuda.is_available() else "cpu"
train_dataset = get_dataset(1000)
train_data_loader = DataLoader(train_dataset, batch_size=32, shuffle=True)
model = init_model().to(device)
train_model(model, train_data_loader, n_epochs=10, show_progress_bar=True, device = device)

Development

Refer to Setup for how to set up development environment.

Metadata

Release files for belief-state-superposition 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for belief-state-superposition 0.1.0
File Size Uploaded
belief_state_superposition-0.1.0.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for belief-state-superposition 0.1.0
File Interpreter ABI Platform
belief_state_superposition-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / belief_state_superposition-0.1.0.tar.gz

Download URL belief_state_superposition-0.1.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d986338b0e79dbbe0ac8aea934422e60e727acc5eea498b98bc471456cd710d0
BLAKE2b-256 checksum
How to use checksums
f7c6d38ae8158c15075ecf123903f9617e5527d699a2977862e696435b80adf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / belief_state_superposition-0.1.0-py3-none-any.whl

Download URL belief_state_superposition-0.1.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c590e7fe29e376b84053eb941316e833616b5c80744844b02bf18855dc65e7a
BLAKE2b-256 checksum
How to use checksums
2ee2afe6b5aa7a0e8eb6e7fcc4e23e31143925d1fac3f2fe9466923ee6029672
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page