Skip to main content

VsusP

VsusP selects variables from shrinkage-prior posterior coefficient draws. It provides sequential two-means (S2M), basic two-means (2-M), spike-and-slab inclusion summaries, the signal adaptive variable selector (SAVS), and an adaptive-L1 approximation to decoupling shrinkage and selection (DSS). Native Gaussian ridge, horseshoe and spike-and-slab fits provide coefficient draws in Python.

Install

pip install vsusp

From GitHub:

python -m pip install "git+https://github.com/nilson01/vsusp-python.git"

Or from a local source directory:

python -m pip install .

For plots and sampling diagnostics:

pip install "vsusp[plots,diagnostics]"

Select variables

Rows contain posterior draws; columns contain coefficients. Exclude the intercept.

import numpy as np
from vsusp import s2m

beta = np.array([[.01, .02, .03, .3, .31, 10, 11],
                 [-.01, -.02, -.03, -.3, -.31, -10, -11]])
path = s2m(beta, [.1, .5])
print(path.summary())
print(path.select(1).selected_names)
# ('x7', 'x6')

Indices are zero-based. The first threshold has index 0. The path shows the selected count at each threshold; it does not choose an optimal threshold.

S2M selected counts at two thresholds for the fixed coefficient example.

Choose an analysis

Task Function
Gaussian shrinkage fitting fit_ridge, fit_horseshoe, fit_spike_slab
Supplied-draw selection s2m, two_means, select
Spike inclusion summaries spike_slab
Sparse coefficient summaries savs, dss
Sampling diagnostics diagnostics
Plots plot_tuning, plot_coefficients, plot_inclusion, plot_trace, plot_autocorrelation

The documentation website includes the tutorials cover fitting, prediction and spike-and-slab draws. The API reference lists inputs and outputs. The reference manual collects the examples, methods and API.

Interpretation

S2M counts and ranking summaries are not posterior inclusion probabilities. Only exact-zero spike-and-slab draws support spike_slab inclusion frequencies. SAVS and DSS can return an empty selection. Their sparse coefficients depend on the stated design and penalty conventions.

Python uses deterministic exact two-means clustering by default. The R package uses randomized k-means by default. The optional Python kmeans backend uses NumPy Lloyd iterations and does not reproduce R's random-number stream.

Assess chain mixing and tuning sensitivity before interpreting fitted results. Short examples and numerical agreement do not establish false-discovery control or general selection accuracy. See methods and limits.

References

Li, H. and Pati, D. (2017). Variable selection using shrinkage priors. Computational Statistics & Data Analysis, 107, 107–119.

Ray, P. and Bhattacharya, A. (2018). Signal Adaptive Variable Selector for the Horseshoe Prior.

Hahn, P. R. and Carvalho, C. M. (2015). Decoupling Shrinkage and Selection in Bayesian Linear Models: A Posterior Summary Perspective. JASA, 110, 435–448.

Numerical evidence: fixed posterior checks.

License and source attribution: NOTICE.

Acknowledgements

Computations were performed on the Arseven Computing Cluster, Department of Statistics, Texas A&M University.

This work received no grant funding.

Metadata

Release files for vsusp 0.1.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 vsusp 0.1.0
File Size Uploaded Provenance
vsusp-0.1.0.tar.gz 1.7 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vsusp 0.1.0
File Interpreter ABI Platform
vsusp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / vsusp-0.1.0.tar.gz

Download URL vsusp-0.1.0.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
6b963c4445473e35b47fb5265e48bcc10ed5d41b2dbe9cdd3a27ab688284a41b
BLAKE2b-256 checksum
How to use checksums
6473310f974a89e80d023a66ae7023e7d548f18a69a811012d16127cef884358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / vsusp-0.1.0-py3-none-any.whl

Download URL vsusp-0.1.0-py3-none-any.whl
Size 36.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4229f7ca2024e5948937cb27d931fb828b524ce6087e167aafd114600aa3bcb2
BLAKE2b-256 checksum
How to use checksums
b1a72c8415f9e51ab69cbf2d4b44837ad8b94c9c10f75b55d19ab0ea6d31c2f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for vsusp 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vsusp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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