Skip to main content

JAX-accelerated Sufficient Dimension Reduction (RSDR, SIR)

Project description

pyrsdr

JAX-accelerated Sufficient Dimension Reduction for Python.

Method Description
RSDR Distance-covariance SDR via Riemannian CG on the Stiefel manifold (Sheng & Yin 2016)
SIR Sliced Inverse Regression (Li 1991)

Installation

pip install pyrsdr

Quick Start

from pyrsdr import RSDR, SIR

# RSDR — distance-covariance SDR
model = RSDR(X, Y, alpha=0.5)
model.fit(d=2)
projected = model.projected_data   # (n, d)
directions = model.dirs            # (p, d)

# SIR — sliced inverse regression
sir = SIR(nslice=10)
sir.fit(X, y, ndir=2)
directions = sir.dirs

Cross-validation

from pyrsdr import rsdr_cv

result = rsdr_cv(X, Y, d=2,
                 alpha_grid=[0.25, 0.5, 0.75, 1.0],
                 K=5, seed=42)
print(result["alpha_star"])

References

Sufficient Dimension Reduction — Foundations

  • Li, K.-C. (1991). Sliced inverse regression for dimension reduction. Journal of the American Statistical Association, 86(414), 316–327.
  • Cook, R. D. (1998). Regression Graphics. New York: Wiley.
  • Li, B. (2018). Sufficient Dimension Reduction. Chapman & Hall/CRC.

Distance-Covariance SDR (RSDR)

  • Sheng, W. & Yin, X. (2016). Sufficient Dimension Reduction via Distance Covariance. Journal of Computational and Graphical Statistics, 25(3), 684–708.

Multivariate Response & Related SDR Work

  • Li, K.-C., Aragon, Y., Shedden, K., & Thomas Agnan, C. (2003). Dimension Reduction for Multivariate Response Data. JASA, 98(461), 99–109.
  • Shedden, K. & Li, K.-C. (2003). Dimension reduction and spatiotemporal regression: applications to neuroimaging. Computing in Science & Engineering, 5(5), 30–36.
  • Huang, S.-H., Shedden, K., & Chang, H.-W. (2023). Inference for the dimension of a regression relationship using pseudo-covariates. Biometrics, 79(3), 2394–2403.

Stiefel Manifold Optimization

  • Absil, P.-A., Mahony, R., & Sepulchre, R. (2008). Optimization Algorithms on Matrix Manifolds. Princeton University Press.
  • Edelman, A., Arias, T. A., & Smith, S. T. (1998). The geometry of algorithms with orthogonality constraints. SIAM J. Matrix Anal. Appl., 20(2), 303–353.

R Packages (Baselines)

Related Software

  • Shedden, K. — github.com/kshedden: Go/Python/Julia packages for statistical modeling, multivariate analysis, and dimension reduction.

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

pyrsdr-0.1.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

pyrsdr-0.1.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file pyrsdr-0.1.0.tar.gz.

File metadata

  • Download URL: pyrsdr-0.1.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrsdr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3a070e13f3a6f1132deff5f69ab8576b6c6dfe12ac6636ff9114f2f7102daa6f
MD5 73ea4f9c0a37cbbb84cbfc79ba3a2a71
BLAKE2b-256 5666d794d761e537cc520ec0a13d095da7b83cb6bfc3358322f0b4bacfe0c97b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrsdr-0.1.0.tar.gz:

Publisher: publish.yml on Links2568/pyrsdr

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

File details

Details for the file pyrsdr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyrsdr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrsdr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb0dcd832e853536dacf437ea97dc96bb2944258a744d0477c056cc8d6b8be16
MD5 ed9fab67efcd005557058dec0037d2e6
BLAKE2b-256 5f9a2cc270cd69ce3960d212873d0b5974931527acffbdaf3926555e5ba79034

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrsdr-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Links2568/pyrsdr

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