Skip to main content

Tensor Separation Learning: interpretable regression via sums of rank-1 separable components.

Project description

tensorsl

Tensor Separation Learning (TSL) — a glass-box regression model. A fitted model is a sum of stages, where each stage is the ordered difference of two non-negative rank-1 products of univariate functions. This keeps the model inspectable while still capturing interactions between features.

tensorsl is the Python package (imported as tsl_py): a fit/predict estimator that slots into typical ML pipelines, backed by a Rust core.

Install

pip install tensorsl

Prebuilt wheels are published for Linux, macOS, and Windows, so no toolchain is needed. To build from source instead, you need a Rust toolchain (the core is pure Rust — no system math libraries required).

Usage

import numpy as np
from tsl_py import TSLRegressor

rng = np.random.default_rng(0)
X = rng.normal(size=(500, 5))
y = X[:, 0] * X[:, 1]

model = TSLRegressor().fit(X, y)
preds = model.predict(X)

The fitted model also exposes per-feature partial dependence and feature importances for interpretation.

Links

License

MIT

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

tensorsl-0.2.0.tar.gz (44.8 MB view details)

Uploaded Source

Built Distributions

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

tensorsl-0.2.0-cp39-abi3-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.9+Windows x86-64

tensorsl-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

tensorsl-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

tensorsl-0.2.0-cp39-abi3-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

tensorsl-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file tensorsl-0.2.0.tar.gz.

File metadata

  • Download URL: tensorsl-0.2.0.tar.gz
  • Upload date:
  • Size: 44.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tensorsl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7804164d87d7413fe8e67285701e502c3bef3f1079f2c3a5990eb3dad28faa36
MD5 e6318f56e742f0d64d2ef39ad1501e84
BLAKE2b-256 f772cd0bbc30a8c153789c59bf57374c4c28fcec4927d79a41958a14f86a6021

See more details on using hashes here.

Provenance

The following attestation bundles were made for tensorsl-0.2.0.tar.gz:

Publisher: release.yml on jyliuu/TSL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tensorsl-0.2.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: tensorsl-0.2.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tensorsl-0.2.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 537be7bd4738f662e5b8210ecf827b48dc3647e2c2a44b3115a635c7a6538d1a
MD5 6693e5790dc519ab30883e016301445b
BLAKE2b-256 d6a2a2f648db87ee5458eb673fb26ea04e2d5c1ecb5da9eb212b3244bff8dbc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for tensorsl-0.2.0-cp39-abi3-win_amd64.whl:

Publisher: release.yml on jyliuu/TSL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tensorsl-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tensorsl-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fd158b07dcc13a3ba9c50beb95f59680d4a348ba1720898e05ed7aad675a23b8
MD5 443748a31279780280fad77a3986d52c
BLAKE2b-256 60cc307d1c225667ad060f2a29c76e2002034fd4b7c221b17f6069c9ae833e45

See more details on using hashes here.

Provenance

The following attestation bundles were made for tensorsl-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on jyliuu/TSL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tensorsl-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tensorsl-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 77fa2c33fe5a6e291a54036fdc7183f76e8872c8d8d23bce15080b2c1bc345b4
MD5 4ba712d804d1ce6993ec7bc619d715e0
BLAKE2b-256 f6d370afe7fa3e6a14c86aaf1cf30618de375af551240be9ded68bfb75cbed4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tensorsl-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on jyliuu/TSL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tensorsl-0.2.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tensorsl-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a1d300dba96219aab1e76a4f0fa597b245e22547f85d4edc881cae7684836805
MD5 eec06f599aac41dcfd5a9be3dd227fbf
BLAKE2b-256 7c89d7f3e680fecc9441348f9c522291c9135a9a3a978b774cf4ad84c5da2b27

See more details on using hashes here.

Provenance

The following attestation bundles were made for tensorsl-0.2.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on jyliuu/TSL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tensorsl-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tensorsl-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 66a58f30b0b3ca6acccdc02ef9ced4ad19cc1e3115468738c4f70bbb146fd6fc
MD5 547dba032fc7d209355eb84c7b4c7d0d
BLAKE2b-256 851032b236d8783a73a660d4f2d788ac1847e771107446793abe08c7b7a11e34

See more details on using hashes here.

Provenance

The following attestation bundles were made for tensorsl-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on jyliuu/TSL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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