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
The package builds from source on install for now, so you need a Rust toolchain and a BLAS library (e.g. OpenBLAS) available. Prebuilt wheels are planned.
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
- Documentation: https://jyliuu.github.io/TSL/
- Source: https://github.com/jyliuu/TSL
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
File details
Details for the file tensorsl-0.1.0.tar.gz.
File metadata
- Download URL: tensorsl-0.1.0.tar.gz
- Upload date:
- Size: 46.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6737979e6b08008b3c9df22ae939e8fa6c366570adaa6f50c5b163a3ad0b9310
|
|
| MD5 |
3b4b07bc8f5998f369030c5537911048
|
|
| BLAKE2b-256 |
491b22692788b4971c5bb00ed4480d1767c7f5400fddaf2b763d8166180fd9c0
|
Provenance
The following attestation bundles were made for tensorsl-0.1.0.tar.gz:
Publisher:
release.yml on jyliuu/TSL
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tensorsl-0.1.0.tar.gz -
Subject digest:
6737979e6b08008b3c9df22ae939e8fa6c366570adaa6f50c5b163a3ad0b9310 - Sigstore transparency entry: 1693951205
- Sigstore integration time:
-
Permalink:
jyliuu/TSL@aacb0a1f056e03bf3bfbe5d9a3739052625806cd -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jyliuu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aacb0a1f056e03bf3bfbe5d9a3739052625806cd -
Trigger Event:
push
-
Statement type: