Skip to main content

Python implementation of LSSFind and LocalLSSFind

Project description

LSSFind

Python implementation of LSSFind and LocalLSSFind.

Installation

This package is available at PyPI and can be installed using

pip install lssfind

Usage

The main algorithms of LSSFind and LocalLSSFind are implemented as get_prevalent_interactions and get_sample_interactions respectively. They can be used with Random Forest from scikit-learn.

from lssfind import get_prevalent_interactions, get_sample_interactions
from sklearn.ensemble import RandomForestRegressor
from sklearn.datasets import make_regression
X, y = make_regression(n_features=4, n_informative=2, random_state=0, shuffle=False)
rf = RandomForestRegressor()
rf.fit(X, y)
get_prevalent_interactions(rf, impurity_decrease_threshold=1., min_weight=0.5)
get_sample_interactions(rf, impurity_decrease_threshold=1., testpoints=[[0, 0, 0, 0]], min_weight_dwp=0.5, min_weight_pp=0.25)

Literature

For theoretical background about LSSFind, see

M. Behr, Y. Wang, X. Li, & B. Yu, Provable Boolean interaction recovery from tree ensemble obtained via random forests, Proc. Natl. Acad. Sci. U.S.A. 119 (22) e2118636119, https://doi.org/10.1073/pnas.2118636119 (2022).

Theoretical background about LocalLSSFind can be found in

K. Vuk, N. A. Ihlo, & M. Behr, Provable Recovery of Locally Important Signed Features and Interactions from Random Forest, arXiv, https://arxiv.org/abs/2512.11081 (2025).

Acknowledgement

Part of our implementation is based on Python code which was provided by Yu Wang as part of iterative Random Forest, a project of the group of Bin Yu, see https://github.com/Yu-Group/iterative-Random-Forest/blob/master/irf/utils.py

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

lssfind-0.1.1.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

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

lssfind-0.1.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file lssfind-0.1.1.tar.gz.

File metadata

  • Download URL: lssfind-0.1.1.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for lssfind-0.1.1.tar.gz
Algorithm Hash digest
SHA256 28571e562c7cf6a55c471d9555ef970fa0a91f8bd30c2349a17de8e6628722a2
MD5 e350a6afe5179ffd6b622a49eea79b00
BLAKE2b-256 f0653b2787fd9a2aaffd2039508ddab1608e684de81ab011d86f332032a25a08

See more details on using hashes here.

File details

Details for the file lssfind-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: lssfind-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for lssfind-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ed8fc708c40b1153d7e78278903db293779db8eaf4b3ce7c6ab6be72f2950ab
MD5 8b486e3c5e8bf0d38b6f488c782507dc
BLAKE2b-256 fc2c7453678728b4ee54d143c59f8fe4654c82fae0ddb7b0ca4b349a6dc7770b

See more details on using hashes here.

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