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.2.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.2-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrsdr-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 b8cdf568f135fe7f34710e11228cf27a4e34afec3b75befc29a9460e384b36a4
MD5 f132787e94866c6f7a8372a97b9ecf89
BLAKE2b-256 2d6ec03377f4b3c60a6ad999a75f712ce4d076f4142c12ccc1c0af25605871c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrsdr-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: pyrsdr-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 51196a6663ff32dff7fd30d335fb821eafbf54cbeefb26c9c66c5de02b7270fd
MD5 bd3d3066186e7c37370c9b2de4c35716
BLAKE2b-256 8c57025316f735e36a2abde6180ee5064bf6258a9ece84f95ebb84f4bdeedf42

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrsdr-0.1.2-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