Skip to main content

PSANN

PSANN is a PyTorch library for regression with trainable sinusoidal activations, composed preprocessing, and episodic optimization. The separate psannlm distribution provides language modeling.

Version 2.0.1 is on the authoritative 2.x API track for both packages. New code should use the typed configuration interfaces shown here. Older constructors and flat configuration inputs are migration-only compatibility routes and are not part of the canonical public surface.

Install from this checkout

Use Python 3.9 or newer. Install a PyTorch build appropriate for your CPU or CUDA runtime before installing PSANN.

python -m pip install -e ".[sklearn]"
# Add language modeling when needed:
python -m pip install ./psannlm

psann depends on NumPy, PyTorch, and PyYAML. Scikit-learn is optional for cloning and model selection. Installing core alone does not install or expose psannlm. See the installation and LM guide for tokenizer and training dependencies.

Regression

import torch  # Initialize PyTorch before optional scientific packages on Windows.
import numpy as np
from psann import PSANNRegressor
from psann.architectures import ArchitectureConfig

X = np.linspace(-1, 1, 64, dtype=np.float32)[:, None]
y = np.sin(3 * X).astype(np.float32)
model = PSANNRegressor(
    architecture=ArchitectureConfig.dense(),
    hidden_layers=1, hidden_units=16, epochs=8,
    batch_size=16, lr=0.01, random_state=7, device="cpu",
)
model.fit(X, y)
predictions = model.predict(X)
model.save("regression.pt")
restored = PSANNRegressor.load("regression.pt", map_location="cpu")
np.testing.assert_allclose(restored.predict(X), predictions, rtol=0, atol=0)

Use nested architecture policies to select residual, convolutional, wave, sequence, or geometric-sparse behavior. Use PreprocessorConfig for LSM composition and EpisodicTrainer(estimator=..., strategy=HISSOConfig(...)) for episodic training. Language modeling uses PSANNLM, PSANNLMDataPrep, LMConfig, and LMArchitectureConfig, with python -m psannlm as its CLI.

Find a workflow

Research examples illustrate experiments; they do not establish general accuracy or performance advantages. Historical result reports are labeled and are not current executable configurations.

Download files

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

Source Distribution

psann-2.0.1.tar.gz (174.9 kB view details)

Uploaded Source

Built Distribution

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

psann-2.0.1-py3-none-any.whl (222.0 kB view details)

Uploaded Python 3

File details

Details for the file psann-2.0.1.tar.gz.

File metadata

  • Download URL: psann-2.0.1.tar.gz
  • Upload date:
  • Size: 174.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for psann-2.0.1.tar.gz
Algorithm Hash digest
SHA256 4573d7844f8ae51f91c28576ca29d66a9f73e519d94e84e1b8c53b6120d3d8e0
MD5 5f9c3be5851b8ff0d5f123050b02d41b
BLAKE2b-256 06d3abd01d38fb258b68cec88df803d34b4b0a1c3074802ad3f2cc13c6cbb214

See more details on using hashes here.

File details

Details for the file psann-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: psann-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 222.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for psann-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6125acd4abd8e92f1c75c61a9069e8f6a4dae1716d1790d2beecd98956a583e
MD5 632d0e522f25dd4fbc53384a0eaf4491
BLAKE2b-256 d78a4ecf309d6535b50f92050742c6cbad59e74db8ac2b51339ba7426af59a8b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 files

2.0.0

2 files

0.12.7

2 files

0.12.4

2 files

0.12.3

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.10.19

2 files

0.10.18

2 files

0.10.17

2 files

0.10.16

2 files

0.10.15

2 files

0.10.14

2 files

0.10.13

2 files

0.10.12

1 file

0.10.11

2 files

0.10.10

2 files

0.10.9

2 files

0.10.8

2 files

0.10.7

2 files

0.10.6

2 files

0.10.5

2 files

0.10.4

2 files

0.10.3

2 files

0.10.1

2 files

0.10.0

2 files

0.9.19

2 files

0.9.18

2 files

0.9.17

2 files

0.9.16

2 files

0.9.15

2 files

0.9.14

2 files

0.9.13

2 files

0.9.12

2 files

0.9.11

2 files

0.9.10

2 files

0.9.9

2 files

0.9.8

2 files

0.9.7

2 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