Flash Amortized Neural Symbolic Regression
Project description
⚡ANSR:
Flash Amortized Neural Symbolic Regression
Papers
- WIP
Usage
pip install flash-ansr
import torch
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# Import flash_ansr
from flash_ansr import (
FlashANSR,
SoftmaxSamplingConfig,
install_model,
get_path,
)
# Specify the model
# Here: https://huggingface.co/psaegert/flash-ansr-v23.0-120M
MODEL = "psaegert/flash-ansr-v23.0-120M"
# Download the latest snapshot of the model
# By default, the model is downloaded to the directory `./models/` in the package root
install_model(MODEL)
# Load the model
model = FlashANSR.load(
directory=get_path('models', MODEL),
generation_config=SoftmaxSamplingConfig(choices=32), # or BeamSearchConfig / MCTSGenerationConfig
n_restarts=8,
).to(device)
# Define data
X = ...
y = ...
# Fit the model to the data
model.fit(X, y, verbose=True)
# Show the best expression
print(model.get_expression())
# Predict with the best expression
y_pred = model.predict(X)
Overview
Training
⚡ANSR Training on Fully Procedurally Generated Data Inspired by NeSymReS (Biggio et al. 2021)
Architecture
FlashANSR Architecture. The model consists of an upgraded version of the SetTransformer (Lee et al. 2019) as an encoder, and a Pre-Norm Transformer decoder (Vaswani et al. 2017) as a generative model over symbolic expressions.
Results
Coming soon
Citation
@software{flash-ansr2024,
author = {Paul Saegert},
title = {Flash Amortized Neural Symbolic Regression},
year = 2024,
publisher = {GitHub},
version = {0.4.2},
url = {https://github.com/psaegert/flash-ansr}
}
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
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 flash_ansr-0.4.2.tar.gz.
File metadata
- Download URL: flash_ansr-0.4.2.tar.gz
- Upload date:
- Size: 154.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5a036f7f10f0343f44e520603c6919ed6cefc22776526c5d68b0c4bef674704
|
|
| MD5 |
70382b879709a2a4923963980a333d1e
|
|
| BLAKE2b-256 |
e93d2616d7278baf2ae213bbc2bb31e9c2260c4b18b99acf591cfe66807fecaa
|
Provenance
The following attestation bundles were made for flash_ansr-0.4.2.tar.gz:
Publisher:
publish.yaml on psaegert/flash-ansr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flash_ansr-0.4.2.tar.gz -
Subject digest:
c5a036f7f10f0343f44e520603c6919ed6cefc22776526c5d68b0c4bef674704 - Sigstore transparency entry: 790778009
- Sigstore integration time:
-
Permalink:
psaegert/flash-ansr@56da60b05f72b0ec1dd784a95846c258abe34de5 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/psaegert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@56da60b05f72b0ec1dd784a95846c258abe34de5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file flash_ansr-0.4.2-py3-none-any.whl.
File metadata
- Download URL: flash_ansr-0.4.2-py3-none-any.whl
- Upload date:
- Size: 173.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
459b7c0f997deda71ea27853f75ff321a7c7c93654872eabb7191787b939813f
|
|
| MD5 |
d1068f57537a2b4d43a9d09fee2e972e
|
|
| BLAKE2b-256 |
4b90838a20dea2040e4993d31aeff0853b522cea137b5f28130cd66e7e1ea971
|
Provenance
The following attestation bundles were made for flash_ansr-0.4.2-py3-none-any.whl:
Publisher:
publish.yaml on psaegert/flash-ansr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flash_ansr-0.4.2-py3-none-any.whl -
Subject digest:
459b7c0f997deda71ea27853f75ff321a7c7c93654872eabb7191787b939813f - Sigstore transparency entry: 790778012
- Sigstore integration time:
-
Permalink:
psaegert/flash-ansr@56da60b05f72b0ec1dd784a95846c258abe34de5 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/psaegert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@56da60b05f72b0ec1dd784a95846c258abe34de5 -
Trigger Event:
release
-
Statement type: