
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
A Python port of the TRexSelector R package for high-dimensional variable selection with false discovery rate (FDR) control.
TRexSelector performs fast variable selection in high-dimensional settings while controlling the false discovery rate (FDR) at a user-defined target level. The package implements the Terminating-Random Experiments Selector (T-Rex) as described in Machkour, Muma, and Palomar (2025).
This Python package provides a port of the original R implementation, maintaining the same functionality while providing a more Pythonic interface. The Python port was created by Arnau Vilella (avp@connect.ust.hk).
For manylinux (most Linux distributions), macOS, and Windows platforms, all dependencies including tlars
will be installed automatically when installing the package. For other systems, you might need to build the tlars
package from source.
pip install trexselector==0.6.9
import numpy as np
from trexselector import trex, generate_gaussian_data
# Generate some example data
X, y, beta = generate_gaussian_data(n=100, p=20, seed=1234)
# Run the T-Rex selector
res = trex(X=X, y=y)
# Get the selected variables
selected_var = res["selected_var"]
print(f"Selected variables: {selected_var}")
The main function for high-dimensional variable selection with FDR control.
Screening variant of T-Rex for ultra-high dimensional datasets.
Run K random experiments with the T-Rex selector.
Add random dummy variables to the predictor matrix.
Add dummy variables with correlation constraints for group variable selection.
Compute the false discovery proportion.
Compute the true positive proportion.
Generate synthetic Gaussian data for testing.
Compute the estimated FDP for a set of voting thresholds.
Compute the expected relative occurrences for the T-Rex selector.
Select variables based on estimated FDP and voting thresholds for basic T-Rex variants.
Select variables based on estimated FDP and voting thresholds for dependency-aware T-Rex variants.
The package supports several variants of the T-Rex selector:
This package is licensed under the GNU General Public License v3.0 (GPL-3.0).
The original R package TRexSelector was created by Jasin Machkour, Simon Tien, Daniel P. Palomar, and Michael Muma. This Python port was developed by Arnau Vilella (avp@connect.ust.hk).
FAQs
T-Rex Selector: High-Dimensional Variable Selection & FDR Control
We found that trexselector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.