Metadata-Version: 2.4
Name: tensorsl
Version: 0.1.3
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: numpy
Requires-Dist: scikit-learn>=1.0.0
Requires-Dist: tensorsl[test,examples] ; extra == 'dev'
Requires-Dist: xgboost>=2.0,<3 ; extra == 'examples'
Requires-Dist: lightgbm>=4,<5 ; extra == 'examples'
Requires-Dist: interpret ; extra == 'examples'
Requires-Dist: matplotlib>=3.8,<4 ; extra == 'examples'
Requires-Dist: pandas>=2,<3 ; extra == 'examples'
Requires-Dist: matplotlib>=3.8,<4 ; extra == 'plots'
Requires-Dist: pytest>=8.0.0 ; extra == 'test'
Requires-Dist: openml>=0.15,<1 ; extra == 'test'
Provides-Extra: dev
Provides-Extra: examples
Provides-Extra: plots
Provides-Extra: test
Summary: Tensor Separation Learning: interpretable regression via sums of rank-1 separable components.
Keywords: machine-learning,interpretable-ml,boosting,rust
Author-email: Jinyang Liu <jl@math.ku.dk>
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Project-URL: Homepage, https://github.com/jyliuu/TSL
Project-URL: Issues, https://github.com/jyliuu/TSL/issues
Project-URL: Repository, https://github.com/jyliuu/TSL

# 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

```bash
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

```python
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

