Metadata-Version: 2.4
Name: lno_prescreener
Version: 0.1.3
Summary: A multiple hypothesis testing tool for pre-screening high-dimensional data using the Leave-n-Out approach.
Author-email: Halil Arici <halilarici00@gmail.com>
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.20.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: statsmodels>=0.13.0
Requires-Dist: tqdm>=4.60.0
Requires-Dist: joblib>=1.0.0

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.

