Skip to main content

Travis AppVeyor Coveralls CircleCI License

sliced

sliced is a python package offering a number of sufficient dimension reduction (SDR) techniques commonly used in high-dimensional datasets with a supervised target. It is compatible with scikit-learn.

Algorithms supported:

  • Sliced Inverse Regression (SIR) [1]

  • Sliced Average Variance Estimation (SAVE) [2]

Documentation / Website: https://joshloyal.github.io/sliced/

Example

Example that shows how to learn a one dimensional subspace from a dataset with ten features:

from sliced.datasets import make_cubic
from sliced import SlicedInverseRegression

# load the 10-dimensional dataset
X, y = make_cubic(random_state=123)

# Set the options for SIR
sir = SlicedInverseRegression(n_directions=1)

# fit the model
sir.fit(X, y)

# transform into the new subspace
X_sir = sir.transform(X)

Installation

Dependencies

sliced requires:

  • Python (>= 2.7 or >= 3.4)

  • NumPy (>= 1.8.2)

  • SciPy (>= 0.13.3)

  • Scikit-learn (>=0.17)

Additionally, to run examples, you need matplotlib(>=2.0.0).

Installation

You need a working installation of numpy and scipy to install sliced. If you have a working installation of numpy and scipy, the easiest way to install sliced is using pip:

pip install -U sliced

If you prefer, you can clone the repository and run the setup.py file. Use the following commands to get the copy from GitHub and install all the dependencies:

git clone https://github.com/joshloyal/sliced.git
cd sliced
pip install .

Or install using pip and GitHub:

pip install -U git+https://github.com/joshloyal/sliced.git

Testing

After installation, you can use pytest to run the test suite via setup.py:

python setup.py test

References:

Metadata

Release files for sliced 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sliced 0.7.0
File Size Uploaded Provenance
sliced-0.7.0.tar.gz 921.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sliced 0.7.0
File Interpreter ABI Platform
sliced-0.7.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 965.0 kB

Release files / sliced-0.7.0.tar.gz

Download URL sliced-0.7.0.tar.gz
Size 921.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e3d440519dcf577e2093fcd13ffe4d60050530596d00d80c9f562f04983d566b
BLAKE2b-256 checksum
How to use checksums
773627e5385d31e4c7072d623d2e532820677e218009b8a2865bf59d96c84cf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sliced-0.7.0-py2.py3-none-any.whl

Download URL sliced-0.7.0-py2.py3-none-any.whl
Size 43.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9d2489f1d2f4ebbb85bcd904a5587063d5c681fbdf7bc54ad02f05fc6e959c71
BLAKE2b-256 checksum
How to use checksums
5df33464f139556b4927f3ffd263aafeece33f74044cca363b2dd77af301223c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for sliced 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page