Skip to main content

A multiple hypothesis testing tool for pre-screening high-dimensional data using the Leave-n-Out approach.

Project description

lno-prescreener

A high-performance, multiple hypothesis testing tool for pre-screening factor selection in high-dimensional data using the Leave-n-Out (LnO) approach.

Designed for researchers working with metabolomic, genomic, or clinical datasets, this library provides a robust, multi-core pipeline to filter out false discoveries using adaptive univariate testing and combinatorial resampling.

FEATURES

  • Scientifically Rigorous: Implements an adaptive decision tree (Anderson-Darling, Levene, KS, Mann-Whitney, t-tests) perfectly aligned with established LnO methodology.
  • Highly Flexible: Works with any Pandas DataFrame. You can define your own target columns, cohort labels, and index parameters.
  • Multi-Core Processing: Utilizes joblib parallel processing to evaluate thousands of features simultaneously, cutting compute times from hours to seconds.
  • Missing Data Handling: Automatically purges incomplete features to maintain strict data integrity.
  • Defensive Design: Explicit input validation prevents obscure math crashes and provides clear, human-readable errors if your data is misconfigured.

THE DETAILS OF THE LNO PRESCREENING METHOD CAN BE FOUND IN THE PAPER: Halil Arici, Fatir A. Qureshi, Jay Mulmule, Juergen Hahn,

Multiple hypothesis testing for pre-screening of factor selection for classification of high-dimensional data,

Journal of Process Control, Volume 152, 2025, 103469, ISSN 0959-1524, https://doi.org/10.1016/j.jprocont.2025.103469.

(https://www.sciencedirect.com/science/article/pii/S0959152425000976)

PLEASE CITE THE ORIGINAL PAPER IF THIS PACKAGE IS USED FOR YOUR RESEARCH OR PAPER.

INSTALLATION

You can install lno-prescreener directly from PyPI: pip install lno-prescreener

QUICK START

Here is a concise example of how to load your data and run the pre-screener pipeline.

from lno_prescreener import LnOPrescreener

Initialize the pre-screener

screener = LnOPrescreener( data_input="sqrt_transformed_data.csv", target_variable="Diagnosis", case_label="ASD", control_label="TD", index_col=0 #(int or None) The column number to use as the row labels (default: 0). Set to None if your data does not have an ID column. )

Run the multiple hypothesis testing pipeline

results = screener.multiple_hypothesis_testing( run_l2o=False, run_l3o=True, fdr_threshold=0.1, p_val_threshold=0.05 )

Save the full comprehensive results to CSV

results.to_csv("prescreening_results.csv", index=False)

API REFERENCE

Initialization LnOPrescreener(data_input, target_variable='Diagnosis', case_label='ASD', control_label='TD', index_col=0)

  • data_input: (str or DataFrame) Path to your CSV file, or a pre-loaded Pandas DataFrame.
  • target_variable: (str) The exact name of the column containing your class labels.
  • case_label: (str) The exact string used to identify cases in the target column.
  • control_label: (str) The exact string used to identify controls in the target column.
  • index_col: (int or None) The column number to use as the row labels (default: 0). Set to None if your data does not have an ID column.

Execution screener.multiple_hypothesis_testing(run_l2o=False, run_l3o=False, p_val_threshold=0.05, fdr_threshold=0.10)

  • run_l2o: (bool) If True, runs the Leave-2-Out permutation tests. Note: Computationally expensive for large N.
  • run_l3o: (bool) If True, runs the Leave-3-Out permutation tests. Note: Highly computationally expensive for large N.
  • p_val_threshold: (float) The alpha threshold for the baseline and adaptive univariate tests (default: 0.05).
  • fdr_threshold: (float) The maximum allowable False Discovery Rate for a feature to be flagged as significant (default: 0.10).

OUTPUT DATAFRAME The multiple_hypothesis_testing method returns a rich Pandas DataFrame containing:

  • The original and shifted p-values.
  • The specific statistical test applied by the adaptive decision tree.
  • Bonferroni and Benjamini-Hochberg corrected p-values.
  • Raw FDR scores and boolean Significant flags for Baseline, L1O, L2O, and L3O.

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

lno_prescreener-0.1.3.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

lno_prescreener-0.1.3-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file lno_prescreener-0.1.3.tar.gz.

File metadata

  • Download URL: lno_prescreener-0.1.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for lno_prescreener-0.1.3.tar.gz
Algorithm Hash digest
SHA256 20869e7976611649f106218f9a59e2c091fd73738c7d967173e12893e8d01e3e
MD5 a9c46b80fa5386841787f696b0ab46fa
BLAKE2b-256 da0d2e2b6040d04b7ec7daa1e6fd871a11d4ca4f49f8dec131b8cebc0c9d9462

See more details on using hashes here.

File details

Details for the file lno_prescreener-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for lno_prescreener-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f06d32b8a618b4d17c444a89a40b9d344e7e2f852a0ed1b58120268a428605da
MD5 345864bc18cf7940e647c120a3080e6e
BLAKE2b-256 a5d7f22e43eb15c7710037824e143e0c937c8d09c2d323bc13676a5510f8d7c2

See more details on using hashes here.

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