Provides a classifier independent filter method for high-dimensional
gene-expression feature selection. The Run Purity Weighted Nearest Shrunken
Centroid ('RPWNSC') score ranks genes by multiplying a run based purity score,
which measures the compactness of class labels after sorting samples by each
feature, by a scaled nearest shrunken centroid score, which measures
standardized class centroid separation relative to within class variation.
The top ranked features can then be used with downstream classifiers without
wrapper search, feature clustering, or classifier dependent training.
'Amjad Ali, Zardad Khan, Saeed Aldahmani' (2026)
Run Purity Weighted Nearest Shrunken Centroid Feature Selection for high-dimensional gene-expression classification.
RPWNSC is a simple filter-based feature ranking method. It is designed for settings where the number of features is much larger than the number of samples, such as microarray and other gene-expression classification datasets.
RPWNSC ranks each feature using two complementary ideas:
The final score is computed as:
RPWNSC_score_j = run_purity_j * scaled_centroid_score_j
This product rewards features that show both compact class-label ordering and strong class discrimination. It also penalizes features that are strong according to only one of the two criteria.
Install the source package file from your working directory:
install.packages("RPWNSC_0.1.0.tar.gz", repos = NULL, type = "source")
library(RPWNSC)
library(RPWNSC)
data(Huntington)
# Use the first 100 genes for a small demonstration.
out <- RPWNSC(Huntington$X[, 1:100], Huntington$Y, topK = 10)
# Top selected feature indices.
out$topK
# Scores for every feature.
out$Scores
RPWNSC() returns a list containing:
| Component | Description |
|---|---|
topK |
Integer vector containing the indices of the selected top ranked features. |
Scores |
Numeric vector containing the final RPWNSC score for every feature. |
The package includes the Huntington's disease gene-expression dataset used for demonstration. It contains 31 samples, 22,283 gene-expression features, and 2 classes.
data(Huntington)
dim(Huntington$X)
table(Huntington$Y)
Ali, A., Khan, Z., and Aldahmani, S. (2026). A run purity weighted nearest shrunken centroid feature selection for high-dimensional gene-expression classification. Machine Learning with Applications, 25, 100947. DOI: https://doi.org/10.1016/j.mlwa.2026.100947. URL: https://www.sciencedirect.com/science/article/pii/S266682702600112X.